|
Lines 403-412
Link Here
|
| 403 |
session_proctitle(s); |
403 |
session_proctitle(s); |
| 404 |
|
404 |
|
| 405 |
#if defined(USE_PAM) |
405 |
#if defined(USE_PAM) |
|
|
406 |
debug("pam"); |
| 406 |
if (options.use_pam && !use_privsep) |
407 |
if (options.use_pam && !use_privsep) |
| 407 |
do_pam_setcred(1); |
408 |
do_pam_setcred(1); |
| 408 |
#endif /* USE_PAM */ |
409 |
#endif /* USE_PAM */ |
| 409 |
|
410 |
debug("calling fork in do_exec_no_pty"); |
| 410 |
/* Fork the child. */ |
411 |
/* Fork the child. */ |
| 411 |
if ((pid = fork()) == 0) { |
412 |
if ((pid = fork()) == 0) { |
| 412 |
is_child = 1; |
413 |
is_child = 1; |
|
Lines 466-471
Link Here
|
| 466 |
do_child(s, command); |
467 |
do_child(s, command); |
| 467 |
/* NOTREACHED */ |
468 |
/* NOTREACHED */ |
| 468 |
} |
469 |
} |
|
|
470 |
debug("parent"); |
| 469 |
#ifdef _UNICOS |
471 |
#ifdef _UNICOS |
| 470 |
signal(WJSIGNAL, cray_job_termination_handler); |
472 |
signal(WJSIGNAL, cray_job_termination_handler); |
| 471 |
#endif /* _UNICOS */ |
473 |
#endif /* _UNICOS */ |
|
Lines 512-520
Link Here
|
| 512 |
* handle the case that fdin and fdout are the same. |
514 |
* handle the case that fdin and fdout are the same. |
| 513 |
*/ |
515 |
*/ |
| 514 |
if (compat20) { |
516 |
if (compat20) { |
|
|
517 |
debug("calling session_set_fds"); |
| 515 |
session_set_fds(s, inout[1], inout[1], s->is_subsystem ? -1 : err[1]); |
518 |
session_set_fds(s, inout[1], inout[1], s->is_subsystem ? -1 : err[1]); |
|
|
519 |
debug("calling session_set_fds done"); |
| 516 |
} else { |
520 |
} else { |
|
|
521 |
debug("server_loop"); |
| 517 |
server_loop(pid, inout[1], inout[1], err[1]); |
522 |
server_loop(pid, inout[1], inout[1], err[1]); |
|
|
523 |
debug("server_loop done"); |
| 518 |
/* server_loop has closed inout[1] and err[1]. */ |
524 |
/* server_loop has closed inout[1] and err[1]. */ |
| 519 |
} |
525 |
} |
| 520 |
#endif /* USE_PIPES */ |
526 |
#endif /* USE_PIPES */ |
|
Lines 1614-1620
Link Here
|
| 1614 |
argv[1] = "-c"; |
1620 |
argv[1] = "-c"; |
| 1615 |
argv[2] = (char *) command; |
1621 |
argv[2] = (char *) command; |
| 1616 |
argv[3] = NULL; |
1622 |
argv[3] = NULL; |
|
|
1623 |
//usleep(10); |
| 1624 |
debug("calling execve for user command"); |
| 1617 |
execve(shell, argv, env); |
1625 |
execve(shell, argv, env); |
|
|
1626 |
debug("execve for user command failed"); |
| 1618 |
perror(shell); |
1627 |
perror(shell); |
| 1619 |
exit(1); |
1628 |
exit(1); |
| 1620 |
} |
1629 |
} |