|
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 |
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?
[Prev in Thread] | Current Thread | [Next in Thread] |