<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/6e034c49eb2e391ee83e67b8185dd42ba918d0a3">https://github.com/macports/macports-base/commit/6e034c49eb2e391ee83e67b8185dd42ba918d0a3</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 6e034c49eb2e391ee83e67b8185dd42ba918d0a3
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Sun Apr 15 15:24:52 2018 +0200
<span style='display:block; white-space:pre;color:#404040;'> pextlib: Always restore signal handling in system
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Even if fork() fails, we need to restore the previous signal handling in
</span><span style='display:block; white-space:pre;color:#404040;'> the parent process and close the opened pipes.
</span>---
src/pextlib1.0/system.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/pextlib1.0/system.c b/src/pextlib1.0/system.c
</span><span style='display:block; white-space:pre;color:#808080;'>index 4ef61c7..c043dd3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/pextlib1.0/system.c
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/pextlib1.0/system.c
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -207,7 +207,8 @@ int SystemCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Ob
</span> switch (pid) {
case -1: /* error */
Tcl_SetResult(interp, strerror(errno), TCL_STATIC);
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ status = TCL_ERROR;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto cleanup;
</span> /*NOTREACHED*/
case 0: /* child */
if (odup) {
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -352,6 +353,7 @@ int SystemCmd(ClientData clientData UNUSED, Tcl_Interp *interp, int objc, Tcl_Ob
</span> }
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+cleanup:
</span> /* restore original signal handling */
sigaction(SIGINT, &old_sa_int, NULL);
sigaction(SIGQUIT, &old_sa_quit, NULL);
</pre><pre style='margin:0'>
</pre>