From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SayE0-0007wr-EH for garchives@archives.gentoo.org; Sat, 02 Jun 2012 23:59:16 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6081CE0796; Sat, 2 Jun 2012 23:58:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id E4333E0763 for ; Sat, 2 Jun 2012 23:58:14 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 633481B400E for ; Sat, 2 Jun 2012 23:58:14 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] multiprocessing.eclass: doing parallel work in bash Date: Sat, 2 Jun 2012 19:58:15 -0400 User-Agent: KMail/1.13.7 (Linux/3.4.0; KDE/4.6.5; x86_64; ; ) References: <201206011841.23302.vapier@gentoo.org> <201206021712.30278.vapier@gentoo.org> <4FCAA1D9.3060303@gentoo.org> In-Reply-To: <4FCAA1D9.3060303@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2141833.0ETH01jr4G"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201206021958.16031.vapier@gentoo.org> X-Archives-Salt: 55d25710-8424-40b9-9c95-d37caf3ac1f2 X-Archives-Hash: 0c823d369482572781bc0d72db7d0123 --nextPart2141833.0ETH01jr4G Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Saturday 02 June 2012 19:29:29 Zac Medico wrote: > On 06/02/2012 02:12 PM, Mike Frysinger wrote: > > On Saturday 02 June 2012 16:39:16 Zac Medico wrote: > >> On 06/02/2012 12:54 PM, Mike Frysinger wrote: > >>> if [[ ! -L /dev/fd/${fd} ]] ; then > >>> eval "exec ${fd}${redir}'${file}'" && break > >>> fi > >>=20 > >> I launched up a GhostBSD livedvd to see what /dev/fd/ looks like on > >> FreeBSD, and it seems to contain plain character devices instead of > >=20 > >> symlinks to character devices: > > i didn't want to use [ -e ] because of broken links, but it seems that > > Linux has diff semantics with /proc and broken symlinks. `test -e` will > > return true. >=20 > How about if we just create a fallback mode for older bash, where no > pipes are involved, and multijob_post_fork just uses `wait` to check > status and effectively causes only one job to execute at a time? hmm, maybe, but i've already written the code to support older versions :) =2Dmike --nextPart2141833.0ETH01jr4G Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJPyqiXAAoJEEFjO5/oN/WBdroQALeVyZcvPaqdXG2MqYEmIEED 4cE8yTrsctMCE27apwBB57Ybyrr6Alz2IoO1WcHZh+8DEjgkRwWaBM9U18zsDK9H Bf4LIEmpg5N/fePMDw0k+EjTRkYg2yY8BWm1h0Omy8CNO/+4swAJP1GwNxe7NQk1 ID0zxS/kT8IMNpM4xEJL8WLEzbhYzOTyHxefK4WgzHWHUuoo8vSe7g6/rER8zIWx WMoxJJhhlPOM3QoQMjWzwStQ+KftOOYF45fxbqnmhpKPpB+JPwMV5ISDfBd+nQ1T Kq3S3BxiPK4HGfLWzEyKo+iAGt9KdvdzkKBawP9UruDteFkCKdTpgZESB66Tr2Qz MIBglL6w+i4/qGwWenyAmrQ0alcwk1H+HSsNgjNnHckknbj32N/QoeGogieuUJaA Gsa+0GZgbDJdAvadzvEbTVeqNEKxh8P/Nfc2PwsWOT9tXiBIytuvV3Ip3SXRMILh Vf/8dx2j81xFyv3zV0ZaXSn6l6swFtYjQuAJaPoQwVqQ9TZCDCh/xpHVUoDTN1E+ u1om151zHM+yAhC07AvrSl5ZLvvppPGvzGqQyQXYmqfZUAn0GJ0CXjPeBXwdKGLB vQY1HSeI8d73nCd/207+3rGCq1JktiIPjnXPGY9b2Wej5ubuCBsO5vtQsxSI+aoc TAnSj5ILVEMh+8+sTao8 =ETMy -----END PGP SIGNATURE----- --nextPart2141833.0ETH01jr4G--