[PATCH] server: report and abort on failure to open /dev/null (Coverity)
Marcus Meissner
meissner at suse.de
Fri Nov 25 03:59:50 CST 2011
Hi,
if we cannot open /dev/null something is really broken.
CID 5470
Ciao, Marcus
---
server/request.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/server/request.c b/server/request.c
index 05c7464..a6a8ca6 100644
--- a/server/request.c
+++ b/server/request.c
@@ -760,6 +760,7 @@ void open_master_socket(void)
/* make sure the stdio fds are open */
fd = open( "/dev/null", O_RDWR );
+ if (fd == -1) fatal_perror ("open /dev/null" );
while (fd >= 0 && fd <= 2) fd = dup( fd );
if (!server_dir) fatal_error( "directory %s cannot be accessed\n", config_dir );
--
1.7.1
More information about the wine-patches
mailing list