9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] rc for loop exiting from emu on Plan 9
@ 2009-02-19 16:38 Anthony Sorace
  2009-02-19 17:15 ` erik quanstrom
  2009-02-19 17:30 ` roger peppe
  0 siblings, 2 replies; 3+ messages in thread
From: Anthony Sorace @ 2009-02-19 16:38 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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?



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] rc for loop exiting from emu on Plan 9
  2009-02-19 16:38 [9fans] rc for loop exiting from emu on Plan 9 Anthony Sorace
@ 2009-02-19 17:15 ` erik quanstrom
  2009-02-19 17:30 ` roger peppe
  1 sibling, 0 replies; 3+ messages in thread
From: erik quanstrom @ 2009-02-19 17:15 UTC (permalink / raw)
  To: 9fans

> 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [9fans] rc for loop exiting from emu on Plan 9
  2009-02-19 16:38 [9fans] rc for loop exiting from emu on Plan 9 Anthony Sorace
  2009-02-19 17:15 ` erik quanstrom
@ 2009-02-19 17:30 ` roger peppe
  1 sibling, 0 replies; 3+ messages in thread
From: roger peppe @ 2009-02-19 17:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

2009/2/19 Anthony Sorace <anothy@gmail.com>:
> 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} ?



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-02-19 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-19 16:38 [9fans] rc for loop exiting from emu on Plan 9 Anthony Sorace
2009-02-19 17:15 ` erik quanstrom
2009-02-19 17:30 ` roger peppe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).