I found current truss behaviour a bit strange. It coredumps always if trussed process do without any significant reason for my understanding. I also confused with comment for commit originally introduced this functionality http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/truss/main.c.diff?r1=1.9&r2=1.10. I propose patch attached to make truss always return result of trussed process and do not kill() itself. What do you think about it?
All the best, Alexander.
--- usr.bin/truss/main.c.orig Mon Jun 16 23:00:35 2003 +++ usr.bin/truss/main.c Mon Jun 16 23:05:03 2003 @@ -144,7 +144,7 @@ struct ex_types *funcs; int in_exec = 0; char *fname = NULL; - int sigexit = 0; + int rval = 0; struct trussinfo *trussinfo; /* Initialize the trussinfo struct */ @@ -283,10 +283,10 @@ break; case S_SIG: fprintf(trussinfo->outfile, "SIGNAL %lu\n", pfs.val); - sigexit = pfs.val; break; case S_EXIT: fprintf (trussinfo->outfile, "process exit, rval = %lu\n", pfs.val); + rval = pfs.val; break; case S_EXEC: funcs = set_etype(trussinfo); @@ -305,11 +305,5 @@ } } while (pfs.why != S_EXIT); fflush(trussinfo->outfile); - if (sigexit) { - if (sigexit == SIGQUIT) - exit(sigexit); - (void) signal(sigexit, SIG_DFL); - (void) kill(getpid(), sigexit); - } - return 0; + return rval; }
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[EMAIL PROTECTED]"