summaryrefslogtreecommitdiff
path: root/source3/printing/print_cups.c
diff options
context:
space:
mode:
authorMarc VanHeyningen <marc.vanheyningen@isilon.com>2009-05-05 21:18:50 +0000
committerTim Prouty <tprouty@samba.org>2009-05-27 13:16:17 -0700
commita4887e250b84c321c75d54b9d3adf6fcf7c27fed (patch)
tree318c1079a6199d283bed94ee3733c9e32855922c /source3/printing/print_cups.c
parent75de7c0e87cc5ecea1a7d7e9b0103a8cc2827895 (diff)
downloadsamba-a4887e250b84c321c75d54b9d3adf6fcf7c27fed.tar.gz
s3: Allow child processes to exit gracefully if we are out of fds
When we run out of file descriptors for some reason, every new connection forks a child that immediately panics causing smbd to coredump. This seems unnecessarily harsh; with this code change we now catch that error and merely log a message about it and exit without the core dump. Signed-off-by: Tim Prouty <tprouty@samba.org>
Diffstat (limited to 'source3/printing/print_cups.c')
-rw-r--r--source3/printing/print_cups.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index 7edfb5edbeb..18f42138c91 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -433,8 +433,8 @@ static bool cups_pcap_load_async(int *pfd)
close_all_print_db();
- if (!reinit_after_fork(smbd_messaging_context(),
- smbd_event_context(), true)) {
+ if (!NT_STATUS_IS_OK(reinit_after_fork(smbd_messaging_context(),
+ smbd_event_context(), true))) {
DEBUG(0,("cups_pcap_load_async: reinit_after_fork() failed\n"));
smb_panic("cups_pcap_load_async: reinit_after_fork() failed");
}