Xref: utzoo comp.bugs.sys5:539 comp.unix.wizards:10748 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ncar!gatech!ncsuvx!ece-csc!ncrcae!rogerc From: rogerc@ncrcae.Columbia.NCR.COM (Roger Collins) Newsgroups: comp.bugs.sys5,comp.unix.wizards Subject: Re: perl finds bug in fgrep(1)! Message-ID: <3704@ncrcae.Columbia.NCR.COM> Date: 29 Aug 88 12:58:35 GMT References: <458@tauros.UUCP> <842@yabbie.rmit.oz> Reply-To: rogerc@ncrcae.Columbia.NCR.COM (Roger Collins) Organization: NCR - E & M Columbia Lines: 19 In article <842@yabbie.rmit.oz> rcodi@yabbie.rmit.oz (Ian Donaldson) writes: > > Its a race condition: fgrep doesn't get started by the shell until > ps does, so ps sometimes completes before fgrep is started. > > If you repeat your second example a few times you will eventually see > some output. Not necessarily, Ian. In all releases of the TOWER 32 4xx/6xx until the current 2.00.00, the -f option of ps(1) does not print the arguments of a process if argc is invalid. A lot of commands invalidate argc by decrementing it during command-line parsing. My guess is fgrep decrements argc, grep doesn't. That simple. -- Roger Collins NCR - E&M Columbia TOWER Uniprocessing Systems rogerc@ncrcae.Columbia.NCR.COM