From: mirtchov@cpsc.ucalgary.ca
To: 9fans@cse.psu.edu
Subject: Re: [9fans] killing rogue processes
Date: Fri, 19 Dec 2003 10:25:48 -0700 [thread overview]
Message-ID: <d7029108d0bcd48316b7886ee0410c83@plan9.ucalgary.ca> (raw)
In-Reply-To: <E1AX6ft-000EjH-1G@t40.swtch.com>
> #!/bin/rc
>> > cd /proc
>> > for (i in *)
>> > cat $i/fd | sed s/^/$i' '/
This one actually works:
% cat lsof
#!/bin/rc
cd /proc
for (i in *)
if(! ~ $i trace)
cat $i/fd | sed 's/^/'^$i^' /'
%
Subst that for lsof.c if you wish -- simple is better :)
By the way, it wasn't a script because I was doing 'ls /proc' instead
of 'in *' and had to deal with the 'ls' process exiting before I had
gotten around to catting its fd file, not that I didn't try :)
andrey
next prev parent reply other threads:[~2003-12-19 17:25 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-18 17:42 mirtchov
2003-12-18 16:57 ` Russ Cox
2003-12-18 18:28 ` andrey mirtchovski
2003-12-18 19:50 ` David Presotto
2003-12-18 20:01 ` mirtchov
2003-12-18 19:13 ` Russ Cox
2003-12-19 14:31 ` mirtchov
2003-12-18 22:31 ` Russ Cox
2003-12-19 17:20 ` ron minnich
2003-12-20 9:01 ` boyd, rounin
2003-12-19 17:25 ` mirtchov [this message]
2003-12-19 6:19 ` boyd, rounin
2003-12-18 20:29 ` mirtchov
2003-12-18 20:41 ` Scott Schwartz
2003-12-18 20:48 ` mirtchov
2003-12-19 3:07 ` David Presotto
2003-12-19 6:45 ` boyd, rounin
2003-12-19 5:57 ` boyd, rounin
2003-12-19 0:03 ` Bruce Ellis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d7029108d0bcd48316b7886ee0410c83@plan9.ucalgary.ca \
--to=mirtchov@cpsc.ucalgary.ca \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).