Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] multiprocessing.eclass: doing parallel work in bash
Date: Sat, 02 Jun 2012 23:59:16
Message-Id: 201206021958.16031.vapier@gentoo.org
In Reply to: Re: [gentoo-dev] multiprocessing.eclass: doing parallel work in bash by Zac Medico
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 > >> > >> 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 > > > >> 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. > > 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 :) -mike

Attachments

File name MIME type
signature.asc application/pgp-signature