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
1 On Saturday 02 June 2012 19:29:29 Zac Medico wrote:
2 > On 06/02/2012 02:12 PM, Mike Frysinger wrote:
3 > > On Saturday 02 June 2012 16:39:16 Zac Medico wrote:
4 > >> On 06/02/2012 12:54 PM, Mike Frysinger wrote:
5 > >>> if [[ ! -L /dev/fd/${fd} ]] ; then
6 > >>> eval "exec ${fd}${redir}'${file}'" && break
7 > >>> fi
8 > >>
9 > >> I launched up a GhostBSD livedvd to see what /dev/fd/ looks like on
10 > >> FreeBSD, and it seems to contain plain character devices instead of
11 > >
12 > >> symlinks to character devices:
13 > > i didn't want to use [ -e ] because of broken links, but it seems that
14 > > Linux has diff semantics with /proc and broken symlinks. `test -e` will
15 > > return true.
16 >
17 > How about if we just create a fallback mode for older bash, where no
18 > pipes are involved, and multijob_post_fork just uses `wait` to check
19 > status and effectively causes only one job to execute at a time?
20
21 hmm, maybe, but i've already written the code to support older versions :)
22 -mike

Attachments

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