Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
int stderr_log_level,
const char * const *argv0, ...);
int samba_runcmd_recv(struct tevent_req *req, int *perrno);
+int samba_runcmd_export_stdin(struct tevent_req *req);
#ifdef DEVELOPER
void samba_start_debugger(void);
}
}
+int samba_runcmd_export_stdin(struct tevent_req *req)
+{
+ struct samba_runcmd_state *state = tevent_req_data(req,
+ struct samba_runcmd_state);
+ int ret = state->fd_stdin;
+
+ state->fd_stdin = -1;
+
+ return ret;
+}
+
static void samba_runcmd_io_handler(struct tevent_context *ev,
struct tevent_fd *fde,
uint16_t flags,