Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102002600
D39942.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D39942.diff
View Options
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -3598,6 +3598,8 @@
sigexit(struct thread *td, int sig)
{
struct proc *p = td->td_proc;
+ const char *coreinfo;
+ int rv;
PROC_LOCK_ASSERT(p, MA_OWNED);
proc_set_p2_wexit(p);
@@ -3622,16 +3624,31 @@
* XXX : Todo, as well as euid, write out ruid too
* Note that coredump() drops proc lock.
*/
- if (coredump(td) == 0)
+ rv = coredump(td);
+ switch (rv) {
+ case 0:
sig |= WCOREFLAG;
+ coreinfo = " (core dumped)";
+ break;
+ case EFAULT:
+ coreinfo = " (no core dump - bad address)";
+ break;
+ case EINVAL:
+ coreinfo = " (no core dump - invalid argument)";
+ break;
+ case EFBIG:
+ coreinfo = " (no core dump - too large)";
+ break;
+ default:
+ coreinfo = " (no core dump - other error)";
+ }
if (kern_logsigexit)
log(LOG_INFO,
"pid %d (%s), jid %d, uid %d: exited on "
"signal %d%s\n", p->p_pid, p->p_comm,
p->p_ucred->cr_prison->pr_id,
td->td_ucred->cr_uid,
- sig &~ WCOREFLAG,
- sig & WCOREFLAG ? " (core dumped)" : "");
+ sig &~ WCOREFLAG, coreinfo);
} else
PROC_UNLOCK(p);
exit1(td, 0, sig);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 7, 10:22 AM (21 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14509605
Default Alt Text
D39942.diff (1 KB)
Attached To
Mode
D39942: Provide some more information for userland core dumps
Attached
Detach File
Event Timeline
Log In to Comment