Commit Graph

26 Commits

Author SHA1 Message Date
msmith
131312c0d6 Flush the output file before exiting; short-lived programs don't even fill
the stdio buffer.
1998-12-21 06:34:50 +00:00
sef
9e0aee1ff0 Add lstat() as a known system call. 1998-10-15 04:31:44 +00:00
des
3ca80efd3a Calls one or more of malloc(), warn(), err(), syslog(), execlp() or
execvp() in the child branch of a vfork(). Changed to use fork()
instead.

Some of these (mv, find, apply, xargs) might benefit greatly from
being rewritten to use vfork() properly.

PR:		Loosely related to bin/8252
Approved by:	jkh and bde
1998-10-13 14:52:33 +00:00
kato
4df6ab63be Use MACHINE_ARCH instead of MACHINE to detect x86 arch.
Pointed out by:	Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
1998-10-07 13:46:09 +00:00
sef
74b596d2ae Make it compile -Wall cleanly.
Submitted by:	Alex Nash <nash@mcs.net>
1998-10-03 18:02:03 +00:00
sef
8c873c0b15 Alpha support for truss. I tested this on both bento and beast (thanks,
Jordan, for pointing me at beast!).  There should be no change for the
i386 version.
1998-10-03 00:43:05 +00:00
sef
82ccb4c632 Use a default execution type if none of the listed ones match. This
uses the first type listed in the array as the default type.  This isn't
perfect, but I thought it would be better than nothing.
1998-09-07 05:49:43 +00:00
cracauer
f3d290b0b5 When exiting on SIGINT, exit with signal status 1998-08-24 10:17:20 +00:00
bde
0609531ab6 Fixed printf format errors. 1998-07-06 21:01:54 +00:00
jb
fbf068fe64 Add a sysmk -> /dev/null definition ready for a coming change to
makesyscalls.sh.
1998-01-25 09:09:48 +00:00
sef
a20e740c7d Revert the changes yet again, after some email from Bruce. Sorry. 1998-01-09 09:31:42 +00:00
sef
6624495c00 Proper way to do the previous mis-commit. Still not quite right, because
some header files (e.g., <err.h>) include <machine/something.h>, and this
will not pick up the right header files, so it may be removed eventually
anyway.  But some people who are not willing to build the right way
apparantly want this, so this is for them.
1998-01-09 00:39:10 +00:00
sef
9a6b147880 Get rid of the bogus include -- it is incomplete (as it doesn't handle
anything other than <sys/*.h>), and unnecessary in most cases.  (The
situations where it is necesary can be dealt with by manually-made symlinks,
which is acceptable since they should only occur during testing.  Remember:
the tree does not compile well if you do not have matching header files
installed.  Half-baked -I directives don't cover enough of the cases.)
1998-01-09 00:22:50 +00:00
jmg
07395e5a81 include sys so it builds on 2.2.x
also, fix misspelling of -1 (as EOF for getopt)
1998-01-07 06:19:50 +00:00
charnier
50a2f19faf Sort Xrefs. Use err(3). Remove uneeded #include.
Correct usage: one of {-p pid, command} is required.
Open output file when command line is fully analyzed: incorrect `truss -o f'
command does not create an empty file anymore.
1998-01-05 07:30:26 +00:00
sef
297bd47472 Add some copyright and license terms, at Jordan's request. Note that
syscall.h just refers to another file for the copyright notice.
1997-12-20 18:40:43 +00:00
sef
f13ddbc865 Change the ioctls for procfs around a bit; in particular, whever possible,
change from

	ioctl(fd, PIOC<foo>, &i);

to

	ioctl(fd, PIOC<foo>, i);

This is going from the _IOW to _IO ioctl macro.  The kernel, procctl, and
truss must be in synch for it all to work (not doing so will get errors about
inappropriate ioctl's, fortunately).  Hopefully I didn't forget anything :).
1997-12-13 03:13:49 +00:00
peter
279e69b9ff s/ps/truss/ 1997-12-07 08:19:13 +00:00
sef
d1f6ae4ce3 Use the new PF_LINGER flag -- when this is set in a process' proc structure,
said process will not have its event mask cleared (and be restarted) on
the last close of a procfs/mem file for that pid.  This reduces the chance
that a truss-monitored process will be left hanging with these bits set
and nobody looking for it.

This is the least-tested change of all of these, I'm afraid.
1997-12-07 04:08:48 +00:00
sef
48a1f82a2e Complain about empty command lines. 1997-12-06 17:13:54 +00:00
peter
3ab5048d88 err(3) already includes strerror(errno) and a trailing \n 1997-12-06 14:42:58 +00:00
peter
9f0d9f2754 recognize "FreeBSD ELF" as an executable type
close() takes a fd, not a char * :-)
1997-12-06 14:41:41 +00:00
peter
bb664e8a40 #include <unistd.h> to get it to compile
Submitted by: Andreas Klemm <andreas@klemm.gtn.com>
1997-12-06 14:39:30 +00:00
sef
999cc45d0b Set the close-on-exec flag in the child; otherwise, it eats up a
file descriptor that it shouldn't.
1997-12-06 08:01:00 +00:00
sef
40d07bddd6 First cut at printing out ioctl names intelligently. Note that this doesn't
handle linux ioctls (yet?).  This uses the mkioctl script from kdump,
bless its little heart.

Reviewed by:	Mike Smith
1997-12-06 06:51:14 +00:00
sef
9e9a114f06 Truss program. Requires procfs. 1997-12-06 05:23:12 +00:00