Bugzilla – Attachment 695 Details for
Bug 897
scp doesn't clean up forked children when processing multiple files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
...and now for something completely diff. The same again for -u
scp.c.antizombie3.udiff (text/plain), 1.82 KB, created by
Stephen Riehm
on 2004-07-22 16:35:32 AEST
(
hide
)
Description:
...and now for something completely diff. The same again for -u
Filename:
MIME Type:
Creator:
Stephen Riehm
Created:
2004-07-22 16:35:32 AEST
Size:
1.82 KB
patch
obsolete
>--- scp.c.ckpt Thu Jul 22 08:32:14 2004 >+++ scp.c Thu Jul 22 08:32:19 2004 >@@ -333,29 +333,29 @@ > > (void) signal(SIGPIPE, lostconn); > >- if ((targ = colon(argv[argc - 1]))) /* Dest is remote host. */ >+ if ((targ = colon(argv[argc - 1]))) { /* Dest is remote host. */ > toremote(targ, argc, argv); >- else { >+ /* >+ * Finally check the exit status of the ssh process, if one was forked >+ * and no error has occured yet >+ */ >+ if (do_cmd_pid != -1 && errs == 0) { >+ if (remin != -1) >+ (void) close(remin); >+ if (remout != -1) >+ (void) close(remout); >+ if (waitpid(do_cmd_pid, &status, 0) == -1) >+ errs = 1; >+ else { >+ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) >+ errs = 1; >+ } >+ } >+ } else { > tolocal(argc, argv); /* Dest is local host. */ > if (targetshouldbedirectory) > verifydir(argv[argc - 1]); > } >- /* >- * Finally check the exit status of the ssh process, if one was forked >- * and no error has occured yet >- */ >- if (do_cmd_pid != -1 && errs == 0) { >- if (remin != -1) >- (void) close(remin); >- if (remout != -1) >- (void) close(remout); >- if (waitpid(do_cmd_pid, &status, 0) == -1) >- errs = 1; >- else { >- if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) >- errs = 1; >- } >- } > exit(errs != 0); > } > >@@ -451,7 +451,7 @@ > void > tolocal(int argc, char **argv) > { >- int i, len; >+ int i, len, status; > char *bp, *host, *src, *suser; > > for (i = 0; i < argc - 1; i++) { >@@ -494,6 +494,18 @@ > sink(1, argv + argc - 1); > (void) close(remin); > remin = remout = -1; >+ if (do_cmd_pid != -1 && errs == 0) { >+ if (remin != -1) >+ (void) close(remin); >+ if (remout != -1) >+ (void) close(remout); >+ if (waitpid(do_cmd_pid, &status, 0) == -1) >+ errs = 1; >+ else { >+ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) >+ errs = 1; >+ } >+ } > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 897
:
686
|
687
|
688
| 695