diff options
author | jhb <jhb@FreeBSD.org> | 2008-05-15 03:07:34 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-05-15 03:07:34 +0000 |
commit | ec0d9f9d00b2956b4d88f6a2d1a615775bea2d1c (patch) | |
tree | b01ba6cb17dfe9b3d9aaf576d4f0255e48d12950 | |
parent | c9d3114663cd31f470909d06b9cfefee23b5762e (diff) | |
download | FreeBSD-src-ec0d9f9d00b2956b4d88f6a2d1a615775bea2d1c.zip FreeBSD-src-ec0d9f9d00b2956b4d88f6a2d1a615775bea2d1c.tar.gz |
Go back to using the process command name (p_comm) for the file name and
command line arguments stored in the note at the beginning of a core dump
instead of the current thread name.
Reviewed by: julian
-rw-r--r-- | sys/kern/imgact_elf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 42f82c8..bec4b68 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1203,12 +1203,12 @@ __elfN(puthdr)(struct thread *td, void *dst, size_t *off, int numsegs) if (dst != NULL) { psinfo->pr_version = PRPSINFO_VERSION; psinfo->pr_psinfosz = sizeof(elf_prpsinfo_t); - strlcpy(psinfo->pr_fname, td->td_name, sizeof(psinfo->pr_fname)); + strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname)); /* * XXX - We don't fill in the command line arguments properly * yet. */ - strlcpy(psinfo->pr_psargs, td->td_name, + strlcpy(psinfo->pr_psargs, p->p_comm, sizeof(psinfo->pr_psargs)); } __elfN(putnote)(dst, off, "FreeBSD", NT_PRPSINFO, psinfo, |