🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.bugs.sys5
Article #835

Re: perl finds bug in fgrep(1)!

#835
From: Roger Collins
Date: Mon, 29 Aug 1988 12:58
19 lines
1237 bytes
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
Technical Details
Message-ID: <3704@ncrcae.Columbia.NCR.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ncar!gatech!ncsuvx!ece-csc!ncrcae!rogerc
References: <458@tauros.UUCP> <842@yabbie.rmit.oz>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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