From 9190052ce96c82289a2d3eda97fbfa0e10e856a0 Mon Sep 17 00:00:00 2001 From: rwatson Date: Sun, 11 Jan 2004 02:28:06 +0000 Subject: 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(-) (limited to 'sys/kern/kern_sig.c') diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index bf822d1..b0a7ce3 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); -- cgit v1.1