Re: Parallelism a la make -j / GNU parallel

2012-05-11 Thread Mike Frysinger
On Monday 07 May 2012 09:08:33 Chet Ramey wrote: > On 5/5/12 12:28 AM, Mike Frysinger wrote: > > On Friday 04 May 2012 16:17:02 Chet Ramey wrote: > >> On 5/4/12 2:53 PM, Mike Frysinger wrote: > >>> it might be a little racy (wrt checking cnt >= 10 and then doing a > >>> wait), but this is good enou

bash crashes when forking jobs and dynamically switching posix mode

2012-05-11 Thread Mike Frysinger
in light of the recent discussion, i thought i could switch posix mode on/off on the fly so that i restricted myself to this mode only when using `wait`. unfortunately, that randomly crashes bash :). simple test case: $ cat test.sh #!/bin/bash max=20 num=0 set -m #set -o posix trap ': $(( --nu

Re: bash crashes when forking jobs and dynamically switching posix mode

2012-05-11 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/11/12 11:43 AM, Mike Frysinger wrote: > in light of the recent discussion, i thought i could switch posix mode on/off > on the fly so that i restricted myself to this mode only when using `wait`. > unfortunately, that randomly crashes bash :).

Re: bash crashes when forking jobs and dynamically switching posix mode

2012-05-11 Thread Mike Frysinger
On Friday 11 May 2012 13:37:58 Chet Ramey wrote: > On 5/11/12 11:43 AM, Mike Frysinger wrote: > > in light of the recent discussion, i thought i could switch posix mode > > on/off on the fly so that i restricted myself to this mode only when > > using `wait`. > > unfortunately, that randomly crashe

Re: bash crashes when forking jobs and dynamically switching posix mode

2012-05-11 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 5/11/12 11:43 AM, Mike Frysinger wrote: > in light of the recent discussion, i thought i could switch posix mode on/off > on the fly so that i restricted myself to this mode only when using `wait`. > unfortunately, that randomly crashes bash :).

Re: bash crashes when forking jobs and dynamically switching posix mode

2012-05-11 Thread Mike Frysinger
On Friday 11 May 2012 14:25:08 Chet Ramey wrote: > On 5/11/12 11:43 AM, Mike Frysinger wrote: > > in light of the recent discussion, i thought i could switch posix mode > > on/off on the fly so that i restricted myself to this mode only when > > using `wait`. > > > unfortunately, that randomly cra

Re: Parallelism a la make -j / GNU parallel

2012-05-11 Thread Ole Tange
On Thu, 3 May 2012 19:49:37, Colin McEwan wrote: > I frequently find myself these days writing shell scripts, to run on > multi-core machines, which could easily exploit lots of parallelism (eg. a > batch of a hundred independent simulations). > > The basic parallelism construct of '&' for async e