Re: [9fans] rc for loop exiting from emu on Plan 9

2009-02-19 Thread roger peppe
2009/2/19 Anthony Sorace :
> i get the same behavior if i
> replace the entire rc for clause with {emu sh -c date}.

did you try @{rfork s; emu sh -c date} ?



Re: [9fans] rc for loop exiting from emu on Plan 9

2009-02-19 Thread erik quanstrom
> for (i in `{seq 1 100}) {echo BEGIN RUN $i ; emu sh -c
> /usr/a/bin/sh/emuerr; echo END RUN $i ; echo}
> 
[...]
> 
> what is rc confused about?
> 

i think the question is, what does emu
do to rc.  i think it kills the note group:

minooka; rc -c '@{emu sh -c date}; echo done' 
Thu Feb 19 17:13:08 GMT 2009
minooka; rc -c '@{rfork s; emu sh -c date}; echo done' 
Thu Feb 19 17:13:34 GMT 2009
done

it might make sense for emu to rfork its
own note group if it is going to killpg.

- erik



[9fans] rc for loop exiting from emu on Plan 9

2009-02-19 Thread Anthony Sorace
Trying to help diagnose a race condition in emu, I did this:

for (i in `{seq 1 100}) {echo BEGIN RUN $i ; emu sh -c
/usr/a/bin/sh/emuerr; echo END RUN $i ; echo}

where emuerr is a sh.dis script that raises an exception. on OS X,
using p9p's rc, i get a bunch of stanzas that look like:

BEGIN RUN 4
start
end
start2
OOPS: fail:some error
END RUN 4

except for the run number. running exactly the same command with the
same script on Plan 9, rc gives up after the "OOPS" line. same
behavior on native plan9 and 9vx. i'd expect the behavior seen on OS
X. it's not the exception, either; i get the same behavior if i
replace the entire rc for clause with {emu sh -c date}.

what is rc confused about?