From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 27 Jul 2013 07:48:22 +0200 From: Jens Staal To: 9fans@9fans.net Message-ID: <20130727074822.50f9af70@Krypton> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Thorsten Glaser Subject: Re: [9fans] MirOS ksh (mksh) building out-of-the box on Plan9/APE Topicbox-Message-UUID: 6e57087e-ead8-11e9-9d60-3106f5b1d025 On Fri, 26 Jul 2013 13:01:16 -0400 erik quanstrom wrote: > On Fri Jul 26 12:30:20 EDT 2013, cinap_lenrek@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 :)