aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/os/utils.c')
-rw-r--r--nx-X11/programs/Xserver/os/utils.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c
index c806621ff..104ff86c6 100644
--- a/nx-X11/programs/Xserver/os/utils.c
+++ b/nx-X11/programs/Xserver/os/utils.c
@@ -1847,12 +1847,19 @@ Popen(char *command, char *type)
if (OsVendorStartRedirectErrorFProc != NULL) {
OsVendorStartRedirectErrorFProc();
}
+ OsBlockSignals ();
#endif
switch (pid = fork()) {
case -1: /* error */
close(pdes[0]);
close(pdes[1]);
xfree(cur);
+#ifdef NX_TRANS_EXIT
+ if (OsVendorEndRedirectErrorFProc != NULL) {
+ OsVendorEndRedirectErrorFProc();
+ }
+ OsReleaseSignals ();
+#endif
return NULL;
case 0: /* child */
if (setgid(getgid()) == -1)
@@ -1917,12 +1924,18 @@ Popen(char *command, char *type)
#endif
+ #ifdef NX_TRANS_EXIT
+ OsReleaseSignals ();
+ #endif
+
execl("/bin/sh", "sh", "-c", command, (char *)NULL);
_exit(127);
}
+#ifndef NX_TRANS_EXIT
/* Avoid EINTR during stdio calls */
OsBlockSignals ();
+#endif
/* parent */
if (*type == 'r') {