chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] Fixing the "process" procedure to be safe against exec


From: Lassi Kortela
Subject: [Chicken-hackers] Fixing the "process" procedure to be safe against execve() errors
Date: Thu, 25 Jul 2019 20:39:05 +0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

I started writing a patch to fix the problems I discovered in this thread on chicken-users: <https://lists.nongnu.org/archive/html/chicken-users/2019-07/msg00041.html>. Is this desired?

If it is: I got stuck on finding the right way to do poll()/select() in Chicken. From cursory grepping, Chicken seems to have its own thread scheduler which does some calls to poll. I don't understand the implications, so I stopped to ask for help instead of going ahead and wrapping Unix poll() in the obvious manner.

So the parent process creates a pipe and forks a child process for the sole purpose of doing execve(). If the execve() fails the child writes the errno value to the pipe. What should the parent do to select()/poll() on the pipe and read the errno value?



reply via email to

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