1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

Fix signal behaviour.

In my last change I made sure that the signal as reported from a truss
exit is the same as if truss wasn't between parent and trussed
program.  I was smart enough to not have it coredump on SIGQUIT but it
didn't ocur to me SIGSEGV might cause a coredump, too :-)

So get rid of SIGQUIT extra hack and limit coredumpsize to zero
instead.

Tested: still works, correct signal reported.  No more codedumps from
SIGSEGV in the trussed proces.  This file compiles cleanly on AMD64
(sledge).

PR:
Submitted by:
Reviewed by:
Approved by:
Obtained from:
MFC after:
This commit is contained in:
Martin Cracauer 2003-12-28 01:20:03 +00:00
parent 69fba1650a
commit 5cdf6a132b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123916

View File

@ -41,7 +41,9 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/pioctl.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <err.h>
#include <errno.h>
@ -304,8 +306,11 @@ main(int ac, char **av) {
} while (pfs.why != S_EXIT);
fflush(trussinfo->outfile);
if (sigexit) {
if (sigexit == SIGQUIT)
exit(sigexit);
struct rlimit rlp;
rlp.rlim_cur = 0;
rlp.rlim_max = 0;
setrlimit(RLIMIT_CORE, &rlp);
(void) signal(sigexit, SIG_DFL);
(void) kill(getpid(), sigexit);
}