On Fri, 26 Jul 2013 13:01:16 -0400 erik quanstrom <quans...@quanstro.net> wrote:
> On Fri Jul 26 12:30:20 EDT 2013, cinap_len...@gmx.de wrote: > > plan9 kernel doesnt send notes on process exit to the parent. i do > > not see any trivial way to emulate SIGCHLD as ape might spawn also > > native processes so we cannot just add code to ape to emit the > > signal on exit. > > > > we might handle wait records in a separate process tho using the > > devproc's wait file (that means also we would need to reimplement > > the various wait functions in ape as one would get a Einuse error > > on wait() when someone reads your wait file, ugh) and also generate > > a signal. Would it be interesting to know how the other mksh ports (I think Syllable and Win32) implemented SIGCHLD emulation? I also saw after some googling that some tests in Go had to be ignored due to SIGCHLD issues on Plan9, so I guess there are more use-cases than this one. Unfortunately I know too little to actually give input on the actual solution - most of it will come out as hot air (which hopefully won't stink...). > > we may also have to do this if we wish to support pthreads with > processes. pthreads allow one thread to wait for the children started > by a second thread. > > - erik > A native APE pthread implementation would be awesome! I have been using Gnu Pth some, but getting a proper APE variant would be much more preferrable :)