Commit bd19cc6c authored by Pavan Balaji's avatar Pavan Balaji
Browse files

[svn-r7692] Now STDIN is completely handled through the proxy's control

socket. This makes STDIN management independent of which bootstrap
server we use. This provides the necessary setup to enable ticket
parent 2f572a2e
......@@ -37,6 +37,7 @@ struct HYD_pmcd_hdr {
CKPOINT,
PMI_RESPONSE,
SIGNAL_PROCESSES,
STDIN,
/* Proxy to UI commands */
PID_LIST,
......
......@@ -19,7 +19,6 @@ static HYD_status init_params(void)
HYDU_init_user_global(&HYD_pmcd_pmip.user_global);
HYD_pmcd_pmip.system_global.enable_stdin = -1;
HYD_pmcd_pmip.system_global.global_core_count = -1;
HYD_pmcd_pmip.system_global.global_process_count = -1;
HYD_pmcd_pmip.system_global.pmi_port = NULL;
......
......@@ -14,7 +14,6 @@ struct HYD_pmcd_pmip {
struct HYD_user_global user_global;
struct {
int enable_stdin;
int global_core_count;
int global_process_count;
......
......@@ -30,23 +30,6 @@ static HYD_status stdio_cb(int fd, HYD_event_t events, void *userp)
stdfd = (int) (size_t) userp;
if (stdfd == STDIN_FILENO) {
status = HYDU_sock_forward_stdio(stdfd, HYD_pmcd_pmip.downstream.in, &closed);
HYDU_ERR_POP(status, "stdin forwarding error\n");
if (closed) {
status = HYDT_dmx_deregister_fd(fd);
HYDU_ERR_POP(status, "unable to deregister fd\n");
close(fd);
close(HYD_pmcd_pmip.downstream.in);
HYD_pmcd_pmip.downstream.in = HYD_FD_CLOSED;
}
goto fn_exit;
}
status = HYDU_sock_read(fd, buf, HYD_TMPBUF_SIZE, &recvd, &closed, 0);
HYDU_ERR_POP(status, "sock read error\n");
......@@ -442,7 +425,7 @@ static HYD_status pmi_listen_cb(int fd, HYD_event_t events, void *userp)
static HYD_status launch_procs(void)
{
int i, j, arg, stdin_fd, process_id, pmi_rank;
int i, j, arg, process_id, pmi_rank;
char *str, *envstr, *list, *pmi_port;
char *client_args[HYD_NUM_TMP_STRINGS];
struct HYD_env *env, *force_env = NULL;
......@@ -522,7 +505,7 @@ static HYD_status launch_procs(void)
status = HYDU_env_create(&env, "PMI_PORT", pmi_port);
HYDU_ERR_POP(status, "unable to create env\n");
/* Restart the proxy. Specify stdin fd only if pmi_rank 0 is in this proxy. */
/* Restart the proxy */
MPL_snprintf(ftb_event_payload, HYDT_FTB_MAX_PAYLOAD_DATA, "pgid:%d ranks:%d-%d",
HYD_pmcd_pmip.local.pgid, HYD_pmcd_pmip.downstream.pmi_rank[0],
HYD_pmcd_pmip.downstream.pmi_rank
......@@ -530,9 +513,7 @@ static HYD_status launch_procs(void)
status = HYDT_ckpoint_restart(HYD_pmcd_pmip.local.pgid, HYD_pmcd_pmip.local.id,
env, HYD_pmcd_pmip.local.proxy_process_count,
pmi_ranks,
pmi_ranks[0] ? NULL :
HYD_pmcd_pmip.system_global.enable_stdin ?
&HYD_pmcd_pmip.downstream.in : NULL,
pmi_ranks[0] ? NULL : &HYD_pmcd_pmip.downstream.in,
HYD_pmcd_pmip.downstream.out,
HYD_pmcd_pmip.downstream.err,
HYD_pmcd_pmip.downstream.pid);
......@@ -695,31 +676,13 @@ static HYD_status launch_procs(void)
client_args[arg++] = NULL;
HYDT_bind_pid_to_cpuset(process_id, &cpuset);
if (pmi_rank == 0) {
status = HYDU_create_process(client_args, force_env,
HYD_pmcd_pmip.system_global.enable_stdin ?
&HYD_pmcd_pmip.downstream.in : NULL,
&HYD_pmcd_pmip.downstream.out[process_id],
&HYD_pmcd_pmip.downstream.err[process_id],
&HYD_pmcd_pmip.downstream.pid[process_id],
cpuset);
HYDU_ERR_POP(status, "create process returned error\n");
if (HYD_pmcd_pmip.system_global.enable_stdin) {
stdin_fd = STDIN_FILENO;
status = HYDT_dmx_register_fd(1, &stdin_fd, HYD_POLLIN,
(void *) (size_t) STDIN_FILENO, stdio_cb);
HYDU_ERR_POP(status, "unable to register fd\n");
}
}
else {
status = HYDU_create_process(client_args, force_env, NULL,
&HYD_pmcd_pmip.downstream.out[process_id],
&HYD_pmcd_pmip.downstream.err[process_id],
&HYD_pmcd_pmip.downstream.pid[process_id],
cpuset);
HYDU_ERR_POP(status, "create process returned error\n");
}
status = HYDU_create_process(client_args, force_env,
pmi_rank ? NULL : &HYD_pmcd_pmip.downstream.in,
&HYD_pmcd_pmip.downstream.out[process_id],
&HYD_pmcd_pmip.downstream.err[process_id],
&HYD_pmcd_pmip.downstream.pid[process_id],
cpuset);
HYDU_ERR_POP(status, "create process returned error\n");
HYDU_free_strlist(client_args);
......@@ -878,6 +841,7 @@ HYD_status HYD_pmcd_pmip_control_cmd_cb(int fd, HYD_event_t events, void *userp)
int cmd_len, closed, i;
struct HYD_pmcd_hdr hdr;
char ftb_event_payload[HYDT_FTB_MAX_PAYLOAD_DATA];
char *buf;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
......@@ -922,6 +886,29 @@ HYD_status HYD_pmcd_pmip_control_cmd_cb(int fd, HYD_event_t events, void *userp)
if (HYD_pmcd_pmip.downstream.pid[i] != -1)
kill(HYD_pmcd_pmip.downstream.pid[i], SIGUSR1);
}
else if (hdr.cmd == STDIN) {
int count;
if (hdr.buflen) {
HYDU_MALLOC(buf, char *, hdr.buflen, status);
HYDU_ERR_POP(status, "unable to allocate memory\n");
status = HYDU_sock_read(fd, buf, hdr.buflen, &count, &closed,
HYDU_SOCK_COMM_MSGWAIT);
HYDU_ERR_POP(status, "unable to read from control socket\n");
HYDU_ASSERT(!closed, status);
status = HYDU_sock_write(HYD_pmcd_pmip.downstream.in, buf, hdr.buflen, &count,
&closed);
HYDU_ERR_POP(status, "unable to write to downstream stdin\n");
HYDU_ASSERT(!closed, status);
HYDU_FREE(buf);
}
else {
close(HYD_pmcd_pmip.downstream.in);
}
}
else {
status = HYD_INTERNAL_ERROR;
}
......
......@@ -93,11 +93,6 @@ static HYD_status iface_fn(char *arg, char ***argv)
return HYDU_set_str_and_incr(arg, argv, &HYD_pmcd_pmip.user_global.iface);
}
static HYD_status enable_stdin_fn(char *arg, char ***argv)
{
return HYDU_set_int_and_incr(arg, argv, &HYD_pmcd_pmip.system_global.enable_stdin);
}
static HYD_status auto_cleanup_fn(char *arg, char ***argv)
{
return HYDU_set_int_and_incr(arg, argv, &HYD_pmcd_pmip.user_global.auto_cleanup);
......@@ -393,7 +388,6 @@ struct HYD_arg_match_table HYD_pmcd_pmip_match_table[] = {
{"launcher-exec", launcher_exec_fn, NULL},
{"demux", demux_fn, NULL},
{"iface", iface_fn, NULL},
{"enable-stdin", enable_stdin_fn, NULL},
{"auto-cleanup", auto_cleanup_fn, NULL},
/* Executable parameters */
......
......@@ -139,11 +139,16 @@ static HYD_status control_cb(int fd, HYD_event_t events, void *userp)
proxy = (struct HYD_proxy *) userp;
status = HYDU_sock_read(fd, &hdr, sizeof(hdr), &count, &closed, HYDU_SOCK_COMM_MSGWAIT);
HYDU_ERR_POP(status, "unable to read command from proxy\n");
HYDU_ASSERT(!closed, status)
if (fd == STDIN_FILENO) {
hdr.cmd = STDIN;
}
else {
status = HYDU_sock_read(fd, &hdr, sizeof(hdr), &count, &closed, HYDU_SOCK_COMM_MSGWAIT);
HYDU_ERR_POP(status, "unable to read command from proxy\n");
HYDU_ASSERT(!closed, status);
}
if (hdr.cmd == PID_LIST) { /* Got PIDs */
if (hdr.cmd == PID_LIST) { /* Got PIDs */
HYDU_MALLOC(proxy->pid, int *, proxy->proxy_process_count * sizeof(int), status);
status = HYDU_sock_read(fd, (void *) proxy->pid,
proxy->proxy_process_count * sizeof(int),
......@@ -222,6 +227,31 @@ static HYD_status control_cb(int fd, HYD_event_t events, void *userp)
HYDU_FREE(buf);
}
else if (hdr.cmd == STDIN) {
HYDU_MALLOC(buf, char *, HYD_TMPBUF_SIZE, status);
HYDU_ERR_POP(status, "unable to allocate memory\n");
HYDU_sock_read(STDIN_FILENO, buf, HYD_TMPBUF_SIZE, &count, &closed, 0);
HYDU_ERR_POP(status, "error reading from stdin\n");
hdr.buflen = count;
HYDU_sock_write(proxy->control_fd, &hdr, sizeof(hdr), &count, &closed);
HYDU_ERR_POP(status, "error writing to control socket\n");
HYDU_ASSERT(!closed, status);
if (hdr.buflen) {
HYDU_sock_write(proxy->control_fd, buf, hdr.buflen, &count, &closed);
HYDU_ERR_POP(status, "error writing to control socket\n");
HYDU_ASSERT(!closed, status);
HYDU_FREE(buf);
}
else {
status = HYDT_dmx_deregister_fd(STDIN_FILENO);
HYDU_ERR_POP(status, "unable to deregister STDIN\n");
}
}
else if (hdr.cmd == PROCESS_TERMINATED) {
if (HYD_server_info.user_global.auto_cleanup == 0) {
/* Update the map of the alive processes */
......@@ -441,6 +471,40 @@ HYD_status HYD_pmcd_pmiserv_proxy_init_cb(int fd, HYD_event_t events, void *user
status = HYDT_dmx_register_fd(1, &fd, HYD_POLLIN, proxy, control_cb);
HYDU_ERR_POP(status, "unable to register fd\n");
if (pgid == 0 && proxy->proxy_id == 0) {
int fd_stdin = STDIN_FILENO;
int stdin_valid;
struct HYD_pmcd_hdr hdr;
/* FIXME: The below stdin_valid check is somehow interfering
* in the case where the application is run in the background,
* but expects some STDIN. The correct behavior is to close
* the STDIN socket for the application in that case. However,
* mpiexec seems to hang. I'm still investigating this
* case. In the meanwhile, I have commented out the stdin
* validity check. PLEASE DO NOT DELETE. All other cases
* dealing with STDIN seem to be working correctly. */
#if 0
status = HYDT_dmx_stdin_valid(&stdin_valid);
HYDU_ERR_POP(status, "unable to check if stdin is valid\n");
#else
stdin_valid = 1;
#endif
if (!stdin_valid) {
hdr.cmd = STDIN;
hdr.buflen = 0;
HYDU_sock_write(proxy->control_fd, &hdr, sizeof(hdr), &count, &closed);
HYDU_ERR_POP(status, "error writing to control socket\n");
HYDU_ASSERT(!closed, status);
}
else {
status = HYDT_dmx_register_fd(1, &fd_stdin, HYD_POLLIN, proxy, control_cb);
HYDU_ERR_POP(status, "unable to register fd\n");
}
}
fn_exit:
HYDU_FUNC_EXIT();
return status;
......
......@@ -101,7 +101,7 @@ HYD_status HYD_pmci_launch_procs(void)
struct HYD_proxy *proxy;
struct HYD_node *node_list = NULL, *node, *tnode;
char *proxy_args[HYD_NUM_TMP_STRINGS] = { NULL }, *control_port = NULL;
int enable_stdin, node_count, i, *control_fd;
int node_count, i, *control_fd;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
......@@ -148,9 +148,6 @@ HYD_status HYD_pmci_launch_procs(void)
status = HYD_pmcd_pmi_fill_in_exec_launch_info(&HYD_server_info.pg_list);
HYDU_ERR_POP(status, "unable to fill in executable arguments\n");
status = HYDT_dmx_stdin_valid(&enable_stdin);
HYDU_ERR_POP(status, "unable to check if stdin is valid\n");
HYDU_MALLOC(control_fd, int *, node_count * sizeof(int), status);
for (i = 0; i < node_count; i++)
control_fd[i] = HYD_FD_UNSET;
......@@ -160,7 +157,7 @@ HYD_status HYD_pmci_launch_procs(void)
HYD_server_info.user_global.bindlib);
HYDU_ERR_POP(status, "unable to initializing binding library");
status = HYDT_bsci_launch_procs(proxy_args, node_list, control_fd, enable_stdin);
status = HYDT_bsci_launch_procs(proxy_args, node_list, control_fd);
HYDU_ERR_POP(status, "launcher cannot launch processes\n");
for (i = 0, proxy = HYD_server_info.pg_list.proxy_list; proxy; proxy = proxy->next, i++)
......
......@@ -551,7 +551,7 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
status = HYD_pmcd_pmi_fill_in_exec_launch_info(pg);
HYDU_ERR_POP(status, "unable to fill in executable arguments\n");
status = HYDT_bsci_launch_procs(proxy_args, node_list, NULL, 0);
status = HYDT_bsci_launch_procs(proxy_args, node_list, NULL);
HYDU_ERR_POP(status, "launcher cannot launch processes\n");
HYDU_free_node_list(node_list);
......
......@@ -732,7 +732,7 @@ static HYD_status fn_spawn(int fd, int pid, int pgid, char *args[])
status = HYD_pmcd_pmi_fill_in_exec_launch_info(pg);
HYDU_ERR_POP(status, "unable to fill in executable arguments\n");
status = HYDT_bsci_launch_procs(proxy_args, node_list, NULL, 0);
status = HYDT_bsci_launch_procs(proxy_args, node_list, NULL);
HYDU_ERR_POP(status, "launcher cannot launch processes\n");
HYDU_free_node_list(node_list);
......
......@@ -12,7 +12,7 @@
HYD_status HYD_pmcd_pmi_fill_in_proxy_args(char **proxy_args, char *control_port, int pgid)
{
int i, arg, use_ddd, use_valgrind, use_strace, enable_stdin;
int i, arg, use_ddd, use_valgrind, use_strace;
char *path_str[HYD_NUM_TMP_STRINGS];
HYD_status status = HYD_SUCCESS;
......@@ -85,17 +85,6 @@ HYD_status HYD_pmcd_pmi_fill_in_proxy_args(char **proxy_args, char *control_port
proxy_args[arg++] = HYDU_strdup("--pgid");
proxy_args[arg++] = HYDU_int_to_str(pgid);
if (pgid == 0) {
status = HYDT_dmx_stdin_valid(&enable_stdin);
HYDU_ERR_POP(status, "unable to check if stdin is valid\n");
}
else {
enable_stdin = 0;
}
proxy_args[arg++] = HYDU_strdup("--enable-stdin");
proxy_args[arg++] = HYDU_int_to_str(enable_stdin);
proxy_args[arg++] = HYDU_strdup("--proxy-id");
proxy_args[arg++] = NULL;
......
......@@ -15,7 +15,7 @@
#include "pbs.h"
HYD_status HYDT_bscd_external_launch_procs(char **args, struct HYD_node *node_list,
int *control_fd, int enable_stdin);
int *control_fd);
HYD_status HYDT_bscd_external_launcher_finalize(void);
HYD_status HYDT_bscd_external_query_env_inherit(const char *env_name, int *ret);
HYD_status HYDT_bscd_external_query_native_int(int *ret);
......
......@@ -10,10 +10,10 @@
#include "bind.h"
#include "external.h"
static int fd_stdin, fd_stdout, fd_stderr;
static int fd_stdout, fd_stderr;
HYD_status HYDT_bscd_external_launch_procs(char **args, struct HYD_node *node_list,
int *control_fd, int enable_stdin)
int *control_fd)
{
int num_hosts, idx, i, host_idx, fd, exec_idx, offset, lh;
int *pid, *fd_list, *dummy;
......@@ -207,13 +207,10 @@ HYD_status HYDT_bscd_external_launch_procs(char **args, struct HYD_node *node_li
HYDU_print_strlist(targs + offset);
}
/* The stdin pointer will be some value for process_id 0; for
* everyone else, it's a dummy value. We don't just pass it
/* The stdin pointer is a dummy value. We don't just pass it
* NULL, as older versions of ssh seem to freak out when no
* stdin socket is provided. */
status = HYDU_create_process(targs + offset, env,
((i == 0 && enable_stdin) ? &fd_stdin : dummy),
&fd_stdout, &fd_stderr,
status = HYDU_create_process(targs + offset, env, dummy, &fd_stdout, &fd_stderr,
&HYD_bscu_pid_list[HYD_bscu_pid_count++], cpuset);
HYDU_ERR_POP(status, "create process returned error\n");
......@@ -223,18 +220,9 @@ HYD_status HYDT_bscd_external_launch_procs(char **args, struct HYD_node *node_li
env = NULL;
}
/* We don't wait for stdin to close */
HYD_bscu_fd_list[HYD_bscu_fd_count++] = fd_stdout;
HYD_bscu_fd_list[HYD_bscu_fd_count++] = fd_stderr;
/* Register stdio callbacks for the spawned process */
if (i == 0 && enable_stdin) {
fd = STDIN_FILENO;
status = HYDT_dmx_register_fd(1, &fd, HYD_POLLIN,
(void *) (size_t) fd_stdin, HYDT_bscu_stdio_cb);
HYDU_ERR_POP(status, "demux returned error registering fd\n");
}
status = HYDT_dmx_register_fd(1, &fd_stdout, HYD_POLLIN,
(void *) (size_t) STDOUT_FILENO, HYDT_bscu_stdio_cb);
HYDU_ERR_POP(status, "demux returned error registering fd\n");
......
......@@ -10,7 +10,7 @@
#include "hydra.h"
HYD_status HYDT_bscd_ll_launch_procs(char **args, struct HYD_node *node_list,
int *control_fd, int enable_stdin);
int *control_fd);
HYD_status HYDT_bscd_ll_query_proxy_id(int *proxy_id);
HYD_status HYDT_bscd_ll_query_node_list(struct HYD_node **node_list);
HYD_status HYDTI_bscd_ll_query_node_count(int *count);
......
......@@ -10,12 +10,12 @@
#include "bind.h"
#include "ll.h"
static int fd_stdin, fd_stdout, fd_stderr;
static int fd_stdout, fd_stderr;
HYD_status HYDT_bscd_ll_launch_procs(char **args, struct HYD_node *node_list,
int *control_fd, int enable_stdin)
int *control_fd)
{
int idx, i, fd, total_procs, node_count;
int idx, i, total_procs, node_count;
int *pid, *fd_list;
char *targs[HYD_NUM_TMP_STRINGS], *node_list_str = NULL;
char *path = NULL, *extra_arg_list = NULL, *extra_arg;
......@@ -88,23 +88,13 @@ HYD_status HYDT_bscd_ll_launch_procs(char **args, struct HYD_node *node_list,
targs[idx++] = NULL;
HYDT_bind_cpuset_zero(&cpuset);
status = HYDU_create_process(targs, NULL,
enable_stdin ? &fd_stdin : NULL, &fd_stdout,
&fd_stderr, &HYD_bscu_pid_list[HYD_bscu_pid_count++], cpuset);
status = HYDU_create_process(targs, NULL, NULL, &fd_stdout, &fd_stderr,
&HYD_bscu_pid_list[HYD_bscu_pid_count++], cpuset);
HYDU_ERR_POP(status, "create process returned error\n");
/* We don't wait for stdin to close */
HYD_bscu_fd_list[HYD_bscu_fd_count++] = fd_stdout;
HYD_bscu_fd_list[HYD_bscu_fd_count++] = fd_stderr;
/* Register stdio callbacks for the spawned process */
if (enable_stdin) {
fd = STDIN_FILENO;
status = HYDT_dmx_register_fd(1, &fd, HYD_POLLIN,
(void *) (size_t) fd_stdin, HYDT_bscu_stdio_cb);
HYDU_ERR_POP(status, "demux returned error registering fd\n");
}
status = HYDT_dmx_register_fd(1, &fd_stdout, HYD_POLLIN,
(void *) (size_t) STDOUT_FILENO, HYDT_bscu_stdio_cb);
HYDU_ERR_POP(status, "demux returned error registering fd\n");
......
......@@ -10,7 +10,7 @@
#include "hydra.h"
HYD_status HYDT_bscd_slurm_launch_procs(char **args, struct HYD_node *node_list,
int *control_fd, int enable_stdin);
int *control_fd);
HYD_status HYDT_bscd_slurm_query_proxy_id(int *proxy_id);
HYD_status HYDT_bscd_slurm_query_node_list(struct HYD_node **node_list);
......
......@@ -10,7 +10,7 @@
#include "bind.h"
#include "slurm.h"
static int fd_stdin, fd_stdout, fd_stderr;
static int fd_stdout, fd_stderr;
static HYD_status node_list_to_str(struct HYD_node *node_list, char **node_list_str)
{
......@@ -60,9 +60,9 @@ static HYD_status node_list_to_str(struct HYD_node *node_list, char **node_list_
}
HYD_status HYDT_bscd_slurm_launch_procs(char **args, struct HYD_node *node_list,
int *control_fd, int enable_stdin)
int *control_fd)
{
int num_hosts, idx, i, fd;
int num_hosts, idx, i;
int *pid, *fd_list;
char *targs[HYD_NUM_TMP_STRINGS], *node_list_str = NULL;
char *path = NULL, *extra_arg_list = NULL, *extra_arg;
......@@ -141,23 +141,13 @@ HYD_status HYDT_bscd_slurm_launch_procs(char **args, struct HYD_node *node_list,
}
HYDT_bind_cpuset_zero(&cpuset);
status = HYDU_create_process(targs, NULL,
enable_stdin ? &fd_stdin : NULL, &fd_stdout,
&fd_stderr, &HYD_bscu_pid_list[HYD_bscu_pid_count++], cpuset);
status = HYDU_create_process(targs, NULL, NULL, &fd_stdout, &fd_stderr,
&HYD_bscu_pid_list[HYD_bscu_pid_count++], cpuset);
HYDU_ERR_POP(status, "create process returned error\n");
/* We don't wait for stdin to close */
HYD_bscu_fd_list[HYD_bscu_fd_count++] = fd_stdout;
HYD_bscu_fd_list[HYD_bscu_fd_count++] = fd_stderr;
/* Register stdio callbacks for the spawned process */
if (enable_stdin) {
fd = STDIN_FILENO;
status = HYDT_dmx_register_fd(1, &fd, HYD_POLLIN,
(void *) (size_t) fd_stdin, HYDT_bscu_stdio_cb);
HYDU_ERR_POP(status, "demux returned error registering fd\n");
}
status = HYDT_dmx_register_fd(1, &fd_stdout, HYD_POLLIN,
(void *) (size_t) STDOUT_FILENO, HYDT_bscu_stdio_cb);
HYDU_ERR_POP(status, "demux returned error registering fd\n");
......
......@@ -51,8 +51,7 @@ struct HYDT_bsci_fns {
/* Launcher functions */
/** \brief Launch processes */
HYD_status(*launch_procs) (
char **args, struct HYD_node *node_list, int *control_fd, int enable_stdin);
HYD_status(*launch_procs) (char **args, struct HYD_node *node_list, int *control_fd);
/** \brief Finalize the bootstrap control device */
HYD_status(*launcher_finalize) (void);
......@@ -100,7 +99,6 @@ HYD_status HYDT_bsci_init(const char *rmk, const char *launcher,
* \param[in] args Arguments to be used for the launched processes
* \param[in] node_list List of nodes to launch processes on
* \param[out] control_fd Control socket to communicate with the launched process
* \param[in] enable_stdin Whether to enable stdin or not
* \param[in] stdout_cb Stdout callback function
* \param[in] stderr_cb Stderr callback function
*
......@@ -115,8 +113,7 @@ HYD_status HYDT_bsci_init(const char *rmk, const char *launcher,
* but allow proxies to query their ID information on each node using
* the HYDT_bsci_query_proxy_id function.
*/
HYD_status HYDT_bsci_launch_procs(
char **args, struct HYD_node *node_list, int *control_fd, int enable_stdin);
HYD_status HYDT_bsci_launch_procs(char **args, struct HYD_node *node_list, int *control_fd);
/**
......
......@@ -12,7 +12,7 @@
#include "persist.h"
HYD_status HYDT_bscd_persist_launch_procs(char **args, struct HYD_node *node_list,
int *control_fd, int enable_stdin);
int *control_fd);
HYD_status HYDT_bscd_persist_wait_for_completion(int timeout);
extern int *HYDT_bscd_persist_control_fd;
......
......@@ -59,10 +59,10 @@ static HYD_status persist_cb(int fd, HYD_event_t events, void *userp)
}
HYD_status HYDT_bscd_persist_launch_procs(char **args, struct HYD_node *node_list,
int *control_fd, int enable_stdin)
int *control_fd)
{
struct HYD_node *node;
int idx, i, tmp_fd;
int idx, i;
HYD_status status = HYD_SUCCESS;
HYDU_FUNC_ENTER();
......@@ -89,14 +89,6 @@ HYD_status HYDT_bscd_persist_launch_procs(char **args, struct HYD_node *node_lis
status = HYDU_send_strlist(HYDT_bscd_persist_control_fd[i], args);
HYDU_ERR_POP(status, "error sending information to hydserv\n");
if (i == 0 && enable_stdin) {
tmp_fd = STDIN_FILENO;
status = HYDT_dmx_register_fd(1, &tmp_fd, HYD_POLLIN,
&HYDT_bscd_persist_control_fd[i],
HYDT_bscu_stdio_cb);
HYDU_ERR_POP(status, "demux returned error registering fd\n");
}
status = HYDT_dmx_register_fd(1, &HYDT_bscd_persist_control_fd[i], HYD_POLLIN, NULL,
persist_cb);
HYDU_ERR_POP(status, "demux returned error registering fd\n");
......
......@@ -21,7 +21,6 @@ static struct {
/* client variables */
int client_fd;
int stdin_fd;
int stdout_fd;
int stderr_fd;
int app_pid;
......@@ -72,19 +71,7 @@ static HYD_status stdio_cb(int fd, HYD_event_t events, void *userp)
HYDU_FUNC_ENTER();
if (fd == private.client_fd) {
/* stdin event */
status = HYDU_sock_forward_stdio(private.client_fd, private.stdin_fd, &closed);
HYDU_ERR_POP