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.