summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/truss/main.c')
-rw-r--r--usr.bin/truss/main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c
index 1514820..5964335 100644
--- a/usr.bin/truss/main.c
+++ b/usr.bin/truss/main.c
@@ -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 @@ START_TRACE:
} 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);
}
OpenPOWER on IntegriCloud