version 1.121, 2010/01/13 12:48:34 |
version 1.122, 2010/01/15 00:05:22 |
|
|
* The underlying ssh is in the same process group, so we must |
* The underlying ssh is in the same process group, so we must |
* ignore SIGINT if we want to gracefully abort commands, |
* ignore SIGINT if we want to gracefully abort commands, |
* otherwise the signal will make it to the ssh process and |
* otherwise the signal will make it to the ssh process and |
* kill it too |
* kill it too. Contrawise, since sftp sends SIGTERMs to the |
|
* underlying ssh, it must *not* ignore that signal. |
*/ |
*/ |
signal(SIGINT, SIG_IGN); |
signal(SIGINT, SIG_IGN); |
|
signal(SIGTERM, SIG_DFL); |
execvp(path, args); |
execvp(path, args); |
fprintf(stderr, "exec: %s: %s\n", path, strerror(errno)); |
fprintf(stderr, "exec: %s: %s\n", path, strerror(errno)); |
_exit(1); |
_exit(1); |