chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [Chicken-users] Spiffy subprocess cleanup


From: Peter Bex
Subject: Re: [Chicken-hackers] [Chicken-users] Spiffy subprocess cleanup
Date: Thu, 23 May 2013 21:17:07 +0200
User-agent: Mutt/1.4.2.3i

On Thu, May 23, 2013 at 08:57:09AM -0700, Bryan Vicknair wrote:
> Thanks a lot Evan and Peter.  That was very helpful.
> 
> I started looking at the process-fork source to write a patch, but I'm not
> familiar enough with chicken-core yet to tackle it.  For now I changed my code
> to use the process* variant that sends a command to the shell and that is
> working.

I've attached a patch that I *think* does the trick.  It also shoots down
any additional threads which may be running in the child process
(even though those should probably not get a chance to run, you never know).
I've also simplified the argument handling and needless(?) messing about
with process-fork without thunk in process-run.

I'd love it if people could test this and provide feedback, because I'm
pretty unsure whether this fix is the correct one.  I've had some trouble
trying to wait for the process, but I was unable to do that even if the
program I tried to execute existed, so that must be a case of PEBKAC.

Cheers,
Peter
-- 
http://www.more-magic.net

Attachment: 0001-Kill-other-threads-when-starting-a-process-and-exit-.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]