aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/utils.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-05 14:52:19 +0000
committermarha <marha@users.sourceforge.net>2011-04-05 14:52:19 +0000
commit6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6 (patch)
tree02e0d5fd297602d526b582dc527e007fe20a326f /xorg-server/os/utils.c
parent1d142834bdb30308784a0654a39b7c0de7e37695 (diff)
parenteaedc21febeadad4cf0e370f5d97e7bdb4470870 (diff)
downloadvcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.gz
vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.bz2
vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.zip
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/os/utils.c')
-rw-r--r--xorg-server/os/utils.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index a9433876b..522253a89 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -1308,10 +1308,7 @@ System(char *command)
perror("signal");
return -1;
}
-
-#ifdef DEBUG
- ErrorF("System: `%s'\n", command);
-#endif
+ DebugF("System: `%s'\n", command);
switch (pid = fork()) {
case -1: /* error */
@@ -1370,6 +1367,9 @@ Popen(char *command, char *type)
/* Ignore the smart scheduler while this is going on */
old_alarm = OsSignal(SIGALRM, SIG_IGN);
if (old_alarm == SIG_ERR) {
+ close(pdes[0]);
+ close(pdes[1]);
+ free(cur);
perror("signal");
return NULL;
}
@@ -1423,9 +1423,7 @@ Popen(char *command, char *type)
cur->next = pidlist;
pidlist = cur;
-#ifdef DEBUG
- ErrorF("Popen: `%s', fp = %p\n", command, iop);
-#endif
+ DebugF("Popen: `%s', fp = %p\n", command, iop);
return iop;
}
@@ -1500,9 +1498,7 @@ Fopen(char *file, char *type)
cur->next = pidlist;
pidlist = cur;
-#ifdef DEBUG
- ErrorF("Fopen(%s), fp = %p\n", file, iop);
-#endif
+ DebugF("Fopen(%s), fp = %p\n", file, iop);
return iop;
#else
@@ -1531,10 +1527,7 @@ Pclose(pointer iop)
int pstat;
int pid;
-#ifdef DEBUG
- ErrorF("Pclose: fp = %p\n", iop);
-#endif
-
+ DebugF("Pclose: fp = %p\n", iop);
fclose(iop);
for (last = NULL, cur = pidlist; cur; last = cur, cur = cur->next)