From a4887e250b84c321c75d54b9d3adf6fcf7c27fed Mon Sep 17 00:00:00 2001 From: Marc VanHeyningen Date: Tue, 5 May 2009 21:18:50 +0000 Subject: 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 --- source3/include/proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include') diff --git a/source3/include/proto.h b/source3/include/proto.h index c78d2c8e0b..717a972505 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1106,7 +1106,7 @@ char *clean_name(TALLOC_CTX *ctx, const char *s); ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, SMB_OFF_T pos); int set_blocking(int fd, bool set); void smb_msleep(unsigned int t); -bool reinit_after_fork(struct messaging_context *msg_ctx, +NTSTATUS reinit_after_fork(struct messaging_context *msg_ctx, struct event_context *ev_ctx, bool parent_longlived); bool yesno(const char *p); -- cgit