diff options
| author | Martin Cracauer <cracauer@FreeBSD.org> | 1998-08-24 10:17:20 +0000 |
|---|---|---|
| committer | Martin Cracauer <cracauer@FreeBSD.org> | 1998-08-24 10:17:20 +0000 |
| commit | 9a4902a99fd0225878dc081f5bc9599c84faad0d (patch) | |
| tree | 3d4beeb644c122859eb279c67eb698bebafcf05a /usr.bin/truss/main.c | |
| parent | 2e809930bacaa9422dff829bf33caa300d7c472a (diff) | |
Notes
Diffstat (limited to 'usr.bin/truss/main.c')
| -rw-r--r-- | usr.bin/truss/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/truss/main.c b/usr.bin/truss/main.c index c83946a4beb7..e5bca663cbcd 100644 --- a/usr.bin/truss/main.c +++ b/usr.bin/truss/main.c @@ -31,7 +31,7 @@ #ifndef lint static const char rcsid[] = - "$Id: main.c,v 1.8 1998/01/07 06:19:50 jmg Exp $"; + "$Id: main.c,v 1.9 1998/07/06 21:01:47 bde Exp $"; #endif /* not lint */ /* @@ -127,6 +127,7 @@ main(int ac, char **av) { struct ex_types *funcs; int in_exec = 0; char *fname = NULL; + int sigexit = 0; while ((c = getopt(ac, av, "p:o:S")) != -1) { switch (c) { @@ -216,6 +217,7 @@ main(int ac, char **av) { break; case S_SIG: fprintf(outfile, "SIGNAL %lu\n", pfs.val); + sigexit = pfs.val; break; case S_EXIT: fprintf (outfile, "process exit, rval = %lu\n", pfs.val); @@ -232,5 +234,11 @@ main(int ac, char **av) { if (ioctl(Procfd, PIOCCONT, val) == -1) warn("PIOCCONT"); } while (pfs.why != S_EXIT); + if (sigexit) { + if (sigexit == SIGQUIT) + exit(sigexit); + (void) signal(sigexit, SIG_DFL); + (void) kill(getpid(), sigexit); + } return 0; } |
