[uClibc-cvs] uClibc/libc/stdio popen.c,1.7,1.8

David McCullough davidm at uclibc.org
Sun Dec 1 23:32:21 UTC 2002


Update of /var/cvs/uClibc/libc/stdio
In directory winder:/tmp/cvs-serv6324

Modified Files:
	popen.c 
Log Message:

If the wait failed in pclose it would return a random status code
instead of -1 as expected.



Index: popen.c
===================================================================
RCS file: /var/cvs/uClibc/libc/stdio/popen.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- popen.c	31 Jul 2002 04:38:58 -0000	1.7
+++ popen.c	1 Dec 2002 23:32:17 -0000	1.8
@@ -64,7 +64,8 @@
 	if (fclose(fd) != 0) {
 		return EOF;
 	}
-	wait(&waitstat);
+	if (wait(&waitstat) == -1)
+		return -1;
 	return waitstat;
 }
 




More information about the uClibc-cvs mailing list