Bugzilla – Attachment 3002 Details for
Bug 2719
Notify user, when ssh transport process dies.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
slightly tweaked
bz2719.diff (text/plain), 993 bytes, created by
Damien Miller
on 2017-06-30 13:39:48 AEST
(
hide
)
Description:
slightly tweaked
Filename:
MIME Type:
Creator:
Damien Miller
Created:
2017-06-30 13:39:48 AEST
Size:
993 bytes
patch
obsolete
>diff --git a/sftp.c b/sftp.c >index c34e836..2739ee4 100644 >--- a/sftp.c >+++ b/sftp.c >@@ -220,6 +220,23 @@ cmd_interrupt(int signo) > errno = olderrno; > } > >+/*ARGSUSED*/ >+static void >+sigchld_handler(int sig) >+{ >+ int save_errno = errno; >+ pid_t pid; >+ const char msg[] = "\rConnection closed. \n"; >+ >+ /* Report if ssh transport process dies. */ >+ while ((pid = waitpid(sshpid, NULL, WNOHANG)) == -1 && errno == EINTR) >+ continue; >+ if (pid == sshpid) >+ (void)write(STDERR_FILENO, msg, sizeof(msg) - 1); >+ >+ errno = save_errno; >+} >+ > static void > help(void) > { >@@ -2119,6 +2136,7 @@ interactive_loop(struct sftp_conn *conn, char *file1, char *file2) > if (err != 0) > break; > } >+ signal(SIGCHLD, SIG_DFL); > free(remote_path); > free(conn); > >@@ -2171,6 +2189,7 @@ connect_to_server(char *path, char **args, int *in, int *out) > signal(SIGTERM, killchild); > signal(SIGINT, killchild); > signal(SIGHUP, killchild); >+ signal(SIGCHLD, sigchld_handler); > close(c_in); > close(c_out); > }
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
Flags:
dtucker
:
ok+
Actions:
View
|
Diff
Attachments on
bug 2719
:
2982
| 3002