Skip to Content.
Sympa Menu

sm-commit - Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andraž 'ruskie' Levstik <ruskie AT codemages.net>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: Re: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (ece35376414ad22a5b94569993504654aff85842)
  • Date: Thu, 16 Apr 2009 07:38:30 +0200 (CEST)

:2009-04-15T23:14:Ethan Grammatikidis:

> There is an additional problem. Applying grep to the output of ps is
> likely to match on the grep command itself, thus:
> $ ps x|grep irssi
> 5703 pts/4 S+ 11:20 irssi
> 30307 pts/16 S+ 0:00 grep irssi
>
> Does the -A option prevent this? The man page gives no indication, and
> frankly I can't see how ps can guarantee not to include grep in it's
> list. It's something of a race condition, all depending on how fast ps
> and grep respectively start up. OTOH I can't get it to break with -A.

Easy to workaround:
$ ps x|grep "irss[i]"
14835 pts/1 Ss+ 249:12 irssi

Of course this would still fail if there is a custom script running
about it. Anyway why isn't this using a call to telinit run $script
stop?

--
Andraž ruskie Levstik
Source Mage GNU/Linux Games/Xorg grimoire guru
Geek/Hacker/Tinker

Don't forget: the future is now. It's just not widely distributed yet.


Archive powered by MHonArc 2.6.24.

Top of Page