From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 15 May 2007 20:24:10 -0400 From: Kris Maglione To: 9fans@cse.psu.edu Subject: Re: [9fans] A simple rc question Message-ID: <20070516002410.GB96831@kris.home> References: <13426df10705150838y7148f207m8fbc1631752fc8aa@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jho1yZJdad60DJr+" Content-Disposition: inline In-Reply-To: <13426df10705150838y7148f207m8fbc1631752fc8aa@mail.gmail.com> User-Agent: Mutt/1.5.15 (2007-04-06) Topicbox-Message-UUID: 68235ed6-ead2-11e9-9d60-3106f5b1d025 --jho1yZJdad60DJr+ Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Incidentally, might I suggest something to the effect of: #!/bin/rc fn cleanup { for(i in $apids) { echo kill >/proc/$i/note } } fn sigint { cleanup } fn sigterm { cleanup } apids=() for(f) { tail -f $f | sed 's/^/'$f:/ & apids = ($apids $apid) } wait --jho1yZJdad60DJr+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.3 (FreeBSD) iD8DBQFGSk8qseQZD8Aui4wRArxMAJ0TAYAjdcCa7AHneyRQRXN0RRr4WgCfXQqL wAgh/pzOBa8gS5ALM3c8Hgg= =2nsO -----END PGP SIGNATURE----- --jho1yZJdad60DJr+--