From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 19 Jun 2007 12:57:49 -0400 From: Kris Maglione To: 9fans@cse.psu.edu Subject: Re: [9fans] equivalent of fstat | grep $portnumber ? Message-ID: <20070619165749.GC67517@kris.home> References: <20070619152735.GB6960@pestilenz.org> <20070619161347.GA67517@kris.home> <14ec7b180706190917j3d1f2edbt68ef2c8d5df9f8cc@mail.gmail.com> <20070619164902.GB67517@kris.home> <14ec7b180706190953x7a25471crbad6ec13e9763960@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LwW0XdcUbUexiWVK" Content-Disposition: inline In-Reply-To: <14ec7b180706190953x7a25471crbad6ec13e9763960@mail.gmail.com> User-Agent: Mutt/1.5.15 (2007-04-06) Topicbox-Message-UUID: 81ca7d38-ead2-11e9-9d60-3106f5b1d025 --LwW0XdcUbUexiWVK Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 19, 2007 at 10:53:16AM -0600, andrey mirtchovski wrote: > why is ps written in C when it may as well be written in rc? Because ps is a much more complex program and used much more=20 extensively. Aside from having quite a few options to process, the work=20 that it does would be much more expensive to do in rc, although a fairly=20 speedy implementation could probably be written without much trouble. But your lsof is equivalent to about 3 lines of rc script, done almost=20 entirely by programs written in C, and is much clearer. I doubt that=20 there's any noteworthy difference in speed, or that it would matter much=20 if there were, so I just can't imagine why you'd want to write it in C. --=20 Kris Maglione The worse your line is tangled, the better is the fishing around you. --LwW0XdcUbUexiWVK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFGeAsMseQZD8Aui4wRArWrAJ4sLrTuXuF0GEkeSZG0g5rE6vEfhACfWUMu Xzmwlerq4IoMT6WtYflzpck= =wx+x -----END PGP SIGNATURE----- --LwW0XdcUbUexiWVK--