aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os/utils.c
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:47:37 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:47:37 +0200
commit55a9311fb1df3b58f73efa575318e7341243392b (patch)
tree0444b91d9a638c1dffd5808b28a4d2c235ccd95f /nx-X11/programs/Xserver/os/utils.c
parentaefdef62fc10335a94cbc5bf3cb86b24c8bc1c9f (diff)
downloadnx-libs-55a9311fb1df3b58f73efa575318e7341243392b.tar.gz
nx-libs-55a9311fb1df3b58f73efa575318e7341243392b.tar.bz2
nx-libs-55a9311fb1df3b58f73efa575318e7341243392b.zip
Imported nx-X11-3.3.0-5.tar.gznx-X11/3.3.0-5
Summary: Imported nx-X11-3.3.0-5.tar.gz Keywords: Imported nx-X11-3.3.0-5.tar.gz into Git repository
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') {