Commit Graph

36 Commits

Author SHA1 Message Date
sef
beea3953a2 Change the output of truss to more closely resemble SysV's. (Yes, it
really is much nicer looking.)

Submitted by:	"Matthew N. Dodd" <winter@jurai.net>
2000-03-18 08:49:41 +00:00
sef
d536f05aa7 Fix a leak. (Thanks Bruce, this was a bonehead mistake on my part :).)
Submitted by:	Bruce Evans
2000-02-15 20:25:47 +00:00
mpp
0c4c0f6f7e Fxi various man pages to stop abusing the .Bx macro to generate
the string "FreeBSD".  Use the .Fx macro instead.  Also did some
minor re-wording/formatting to work around a deficiency with
the .Fx macro when it comes to puncuation characters other than
periods and commas.
2000-01-23 01:48:16 +00:00
sef
43c2df1ac6 Handle the case where we truss an SUGID program -- in particular, we need
to wake up any processes waiting via PIOCWAIT on process exit, and truss
needs to be more aware that a process may actually disappear while it's
waiting.

Reviewed by:	Paul Saab <ps@yahoo-inc.com>
2000-01-10 04:09:05 +00:00
marcel
fa23775ca2 Fix for the new usage of mkioctls 1999-12-03 17:35:34 +00:00
marcel
b6a67d6d2b ${MACHINE} -> ${MACHINE_ARCH}
All Makefiles now use MACHINE_ARCH for the target architecture.
Unification is required for cross-building.

Tags added to:
	sys/boot/Makefile
	sys/boot/arc/loader/Makefile
	sys/kern/Makefile
	usr.bin/cpp/Makefile
	usr.bin/gcore/Makefile
	usr.bin/truss/Makefile

usr.bin/gcore/Makefile:
	fixed typo: MACHINDE -> MACHINE_ARCH
1999-11-14 13:54:44 +00:00
mpp
1c0a3cee71 Add $FreeBSD$ lines to man pages that are missing them to make it
easier for translation teams.

PR:		docs/13418
Submitted by:	Alexey Zelkin <phantom@cris.net>
1999-08-28 23:23:38 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
des
4e66bdb946 Teach truss to print symbolic signal names (e.g. SIGHUP instead of 0x01). 1999-08-10 16:57:37 +00:00
des
ae795ea050 Add access(2) to the list of recognized syscalls. 1999-08-05 12:03:50 +00:00
msmith
ece733bdb6 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
573ae90d4a Add lstat() as a known system call. 1998-10-15 04:31:44 +00:00
des
d55d163bcc 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
7229e2d265 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
1934827ad8 Make it compile -Wall cleanly.
Submitted by:	Alex Nash <nash@mcs.net>
1998-10-03 18:02:03 +00:00
sef
5ec8059ee0 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
0a1110cc66 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
3ef1b27d0c When exiting on SIGINT, exit with signal status 1998-08-24 10:17:20 +00:00
bde
0ea85390b1 Fixed printf format errors. 1998-07-06 21:01:54 +00:00
jb
f2459d66df Add a sysmk -> /dev/null definition ready for a coming change to
makesyscalls.sh.
1998-01-25 09:09:48 +00:00
sef
443ce91143 Revert the changes yet again, after some email from Bruce. Sorry. 1998-01-09 09:31:42 +00:00
sef
a5c7e71e5b 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
1994721c15 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
0de794324f 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
cd66b61113 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
200a2249fa 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
49436fdfd5 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
26ba3927e9 s/ps/truss/ 1997-12-07 08:19:13 +00:00
sef
3001e14a07 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
066f37ec97 Complain about empty command lines. 1997-12-06 17:13:54 +00:00
peter
de2f3e3f4b err(3) already includes strerror(errno) and a trailing \n 1997-12-06 14:42:58 +00:00
peter
6e382b4c4d recognize "FreeBSD ELF" as an executable type
close() takes a fd, not a char * :-)
1997-12-06 14:41:41 +00:00
peter
d791292fb7 #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
26b4d5d167 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
8d13d4b016 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
2d6f26ddab Truss program. Requires procfs. 1997-12-06 05:23:12 +00:00