summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authortodd stecher <todd.stecher@gmail.com>2009-02-12 00:11:38 -0800
committerSteven Danneman <steven.danneman@isilon.com>2009-02-18 18:08:33 -0800
commit03421944b2bd82caf13946b745e4d634f0559f82 (patch)
treee9a6bc17f5703b2d5d1532e3f5dfd9662a729e4a /source3/lib
parentc441f58dedc465f59060296815a0bc7f9aeb743f (diff)
downloadsamba-03421944b2bd82caf13946b745e4d634f0559f82.tar.gz
samba-03421944b2bd82caf13946b745e4d634f0559f82.tar.bz2
samba-03421944b2bd82caf13946b745e4d634f0559f82.zip
S3: Stop creating SMBD cores when failing to create a pipe.
This was uncovered when the MAX FD limit was hit, causing an instant core and invoking error reporting. This fix causes SMBD to exit, but without building a core.
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/select.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/lib/select.c b/source3/lib/select.c
index 14e59257ba..a58530af8d 100644
--- a/source3/lib/select.c
+++ b/source3/lib/select.c
@@ -59,7 +59,17 @@ int sys_select(int maxfd, fd_set *readfds, fd_set *writefds, fd_set *errorfds, s
if (initialised != sys_getpid()) {
if (pipe(select_pipe) == -1)
- smb_panic("Could not create select pipe");
+ {
+ DEBUG(0, ("sys_select: pipe failed (%s)\n",
+ strerror(errno)));
+ if (readfds != NULL)
+ FD_ZERO(readfds);
+ if (writefds != NULL)
+ FD_ZERO(writefds);
+ if (errorfds != NULL)
+ FD_ZERO(errorfds);
+ return -1;
+ }
/*
* These next two lines seem to fix a bug with the Linux