From def055686c94fbb3d716cd1750099c412d347826 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 11 Jan 2004 02:28:06 +0000 Subject: [PATCH] When not creating a core dump due to resource limits specifying a maximum dump size of 0, return a size-related error, rather than returning success. Otherwise, waitpid() will incorrectly return a status indicating that a core dump was created. Note that the specific error doesn't actually matter, since it's lost. MFC after: 2 weeks PR: 60367 Submitted by: Valentin Nechayev --- sys/kern/kern_sig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index bf822d10e7b..b0a7ce338a7 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2555,7 +2555,7 @@ coredump(struct thread *td) limit = p->p_rlimit[RLIMIT_CORE].rlim_cur; if (limit == 0) { PROC_UNLOCK(p); - return 0; + return EFBIG; } PROC_UNLOCK(p);