summaryrefslogtreecommitdiffstats
path: root/usr.bin/truss/setup.c
Commit message (Collapse)AuthorAgeFilesLines
* MFp4: Bugfixes for truss(1):delphij2007-06-261-1/+6
| | | | | | | | | | | - Fix logic handling execve(). We will not be able to obtain information otherwise. - truss coredump [1]. - truss does not work against itself [2]. PR: bin/58970 [1], bin/45193 [2] Submitted by: Howard Su Approved by: re (kensmith)
* Make use of ptrace(2) instead of procfs in truss(1), eliminatingdelphij2007-04-101-103/+117
| | | | | | | | yet another need of an available /proc/ mount. Tested with: make universe Submitted by: howardsu Reviewed by: alfred
* - Add decoding of kse_release, kevent, sigprocmask, unmount, socket, getrusage,pav2006-05-151-10/+27
| | | | | | | | | | | | | | | | | | | rename, __getcwd, shutdown, getrlimit, setrlimit, _umtx_lock, _umtx_unlock, pathconf, truncate, ftruncate, kill - Decode more arguments of open, mprot, *stat, and fcntl. - Convert all constant-macro and bitfield decoding to lookup tables; much cleaner than previous code. - Print the timestamp of process exit and signal reception when -d or -D are in use - Try six times with 1/2 second delay to debug the child PR: bin/52190 (updated) Submitted by: Dan Nelson <dnelson@allantgroup.com> Approved by: alfred
* When doing the initial open of the proc via procfs, complain if we arealfred2005-03-271-3/+3
| | | | | | unable to open the /proc/pid/mem file. Otherwise doing a truss on a nonexistant pid makes us return success even though no such process exists.
* I've been working on this somewhat so I'm moving thealfred2005-03-271-95/+98
| | | | parts I'm touching to be as style(9) compliant as I can.
* Move declarations of Procfd to a header file.dwmalone2004-01-071-1/+0
|
* Add FBSDID. Do not \n terminate warnx() argument. fprint() -> warnx().charnier2003-09-071-6/+3
|
* - Use time.h not sys/time.h.mdodd2002-08-061-1/+1
| | | | | | - Fix printf format errors. Submitted by: bde
* Include <sys/time.h> for the declaration of struct timeval. Do notbde2002-08-041-0/+1
| | | | | | depend on namespace pollution in <signal.h>. (truss shouldn't be using timevals anyway, since it was implemented long after timevals were obsoleted by timespecs.)
* Allow tracking fork()ed children.mdodd2002-08-041-3/+3
| | | | | PR: bin/25587 (in part) MFC after: 3 weeks
* Parameterize globals.mdodd2002-08-041-0/+1
| | | | | PR: bin/25587 (in part) MFC after: 3 weeks
* Partial WARNS=1 fizes with NO_WERROR set to prevent world breakage.markm2001-12-111-1/+3
| | | | Use __FBSDID().
* Back out part of previous commit: remove #include <sys/proc.h>.des2001-10-221-1/+0
|
* #include <sys/proc.h> where needed (for the stop event definitions) anddes2001-10-221-4/+6
| | | | reorder includes everywhere to conform to style(9).
* Handle the case where we truss an SUGID program -- in particular, we needsef2000-01-101-1/+9
| | | | | | | | 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>
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Calls one or more of malloc(), warn(), err(), syslog(), execlp() ordes1998-10-131-4/+4
| | | | | | | | | | | 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
* Sort Xrefs. Use err(3). Remove uneeded #include.charnier1998-01-051-11/+11
| | | | | | 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.
* Add some copyright and license terms, at Jordan's request. Note thatsef1997-12-201-1/+33
| | | | syscall.h just refers to another file for the copyright notice.
* Change the ioctls for procfs around a bit; in particular, whever possible,sef1997-12-131-13/+9
| | | | | | | | | | | | | | 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 :).
* Use the new PF_LINGER flag -- when this is set in a process' proc structure,sef1997-12-071-1/+20
| | | | | | | | | 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.
* err(3) already includes strerror(errno) and a trailing \npeter1997-12-061-6/+6
|
* Set the close-on-exec flag in the child; otherwise, it eats up asef1997-12-061-1/+2
| | | | file descriptor that it shouldn't.
* Truss program. Requires procfs.sef1997-12-061-0/+125
OpenPOWER on IntegriCloud