summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2004-01-11 02:28:06 +0000
committerrwatson <rwatson@FreeBSD.org>2004-01-11 02:28:06 +0000
commit9190052ce96c82289a2d3eda97fbfa0e10e856a0 (patch)
tree3dc1d5183b155f48e737de5a944241858b84ee1c
parentad9cde45fa599fbe173514048c3bef09b3786b4c (diff)
downloadFreeBSD-src-9190052ce96c82289a2d3eda97fbfa0e10e856a0.zip
FreeBSD-src-9190052ce96c82289a2d3eda97fbfa0e10e856a0.tar.gz
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 <netch@netch.kiev.ua>
-rw-r--r--sys/kern/kern_sig.c2
1 files changed, 1 insertions, 1 deletions
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);
OpenPOWER on IntegriCloud