From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 19 Jun 2007 14:08:14 -0400 From: Kris Maglione To: 9fans@cse.psu.edu Subject: Re: [9fans] equivalent of fstat | grep $portnumber ? Message-ID: <20070619180814.GE67517@kris.home> References: <20070619152735.GB6960@pestilenz.org> <20070619161347.GA67517@kris.home> <14ec7b180706190917j3d1f2edbt68ef2c8d5df9f8cc@mail.gmail.com> <20070619164902.GB67517@kris.home> <14ec7b180706190953x7a25471crbad6ec13e9763960@mail.gmail.com> <20070619165749.GC67517@kris.home> <14ec7b180706191016w6062421am906a8578cd62be12@mail.gmail.com> <20070619173818.GD67517@kris.home> <1182276570.25089.53.camel@work.sfbay.sun.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a+b56+3nqLzpiR9O" Content-Disposition: inline In-Reply-To: <1182276570.25089.53.camel@work.sfbay.sun.com> User-Agent: Mutt/1.5.15 (2007-04-06) Topicbox-Message-UUID: 81ef04d2-ead2-11e9-9d60-3106f5b1d025 --a+b56+3nqLzpiR9O Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 19, 2007 at 11:09:30AM -0700, Roman Shaposhnick wrote: >On Tue, 2007-06-19 at 13:38 -0400, Kris Maglione wrote: >> The other problems you mentioned seem trivial. Redirecting greps stderr= =20 >> to /dev/null solves the second 2. There are a number of simple ways to= =20 >> solve the first. > > What about the race? That's always been one of my personal pet peeves=20 >as far as any shell programming goes. Redirecting to /dev/null. The only real issue with the race is that=20 there's an error message printed. Hiding the error message from grep is=20 basically the same as not printing it in lsof.c. --=20 Kris Maglione Things equal to nothing else are equal to each other. --a+b56+3nqLzpiR9O Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFGeBuNseQZD8Aui4wRAmySAJ9YSKT+vHdB0KyYyl8MGxzdoGfV0QCfa8Fq yk2Z+iiqvgARcAzgg1+Y8V8= =mCu/ -----END PGP SIGNATURE----- --a+b56+3nqLzpiR9O--