diff options
author | Damien Miller <djm@mindrot.org> | 2004-06-15 10:24:13 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2004-06-15 10:24:13 +1000 |
commit | 350327c0428572f16b1c4080ef61473942217a27 (patch) | |
tree | d4c9a623c6e14f2705f785ecddf66798ca15b1f6 /sftp.c | |
parent | 94befab9dd03fdcde634a8142ad1004930031a11 (diff) |
- djm@cvs.openbsd.org 2004/05/26 08:59:57
[sftp.c]
exit -> _exit in forked child on error; from andrushock AT korovino.net
Diffstat (limited to 'sftp.c')
-rw-r--r-- | sftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #include "includes.h" | 17 | #include "includes.h" |
18 | 18 | ||
19 | RCSID("$OpenBSD: sftp.c,v 1.46 2004/05/19 12:17:33 djm Exp $"); | 19 | RCSID("$OpenBSD: sftp.c,v 1.47 2004/05/26 08:59:57 djm Exp $"); |
20 | 20 | ||
21 | #include "buffer.h" | 21 | #include "buffer.h" |
22 | #include "xmalloc.h" | 22 | #include "xmalloc.h" |
@@ -1265,7 +1265,7 @@ connect_to_server(char *path, char **args, int *in, int *out) | |||
1265 | if ((dup2(c_in, STDIN_FILENO) == -1) || | 1265 | if ((dup2(c_in, STDIN_FILENO) == -1) || |
1266 | (dup2(c_out, STDOUT_FILENO) == -1)) { | 1266 | (dup2(c_out, STDOUT_FILENO) == -1)) { |
1267 | fprintf(stderr, "dup2: %s\n", strerror(errno)); | 1267 | fprintf(stderr, "dup2: %s\n", strerror(errno)); |
1268 | exit(1); | 1268 | _exit(1); |
1269 | } | 1269 | } |
1270 | close(*in); | 1270 | close(*in); |
1271 | close(*out); | 1271 | close(*out); |
@@ -1281,7 +1281,7 @@ connect_to_server(char *path, char **args, int *in, int *out) | |||
1281 | signal(SIGINT, SIG_IGN); | 1281 | signal(SIGINT, SIG_IGN); |
1282 | execv(path, args); | 1282 | execv(path, args); |
1283 | fprintf(stderr, "exec: %s: %s\n", path, strerror(errno)); | 1283 | fprintf(stderr, "exec: %s: %s\n", path, strerror(errno)); |
1284 | exit(1); | 1284 | _exit(1); |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | signal(SIGTERM, killchild); | 1287 | signal(SIGTERM, killchild); |