Check return value of pipe(2)
authorVolker Lendecke <vl@samba.org>
Sat, 23 Feb 2008 09:49:00 +0000 (10:49 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 23 Feb 2008 10:04:13 +0000 (11:04 +0100)
source/lib/select.c

index d5e4ba68f29b59aaa74ff2950a96823bec9123de..c3da6a9bbaf4924a820c45ac72898ad92d321702 100644 (file)
@@ -58,7 +58,8 @@ int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, s
        fd_set *readfds2, readfds_buf;
 
        if (initialised != sys_getpid()) {
-               pipe(select_pipe);
+               if (pipe(select_pipe) == -1)
+                       smb_panic("Could not create select pipe");
 
                /*
                 * These next two lines seem to fix a bug with the Linux