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:
parent
69fba1650a
commit
5cdf6a132b
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user