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>
This commit is contained in:
parent
ce2390b500
commit
d35259a0cb
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user