hyln9 / ikarus

Optimizing incremental native-code compiler for R6RS scheme. This is a forked repository.
https://launchpad.net/ikarus
Other
5 stars 0 forks source link

process procedure should have exit callback #243

Open hyln9 opened 10 years ago

hyln9 commented 10 years ago

Seeing the process procedure returns values and I assume then non-blocking, it should also take a callback procedure to notify the user if the process has exited passing the exit code as an arguement.

Launchpad Details: #LP177701 leppie - 2007-12-20 11:34:22 -0500

hyln9 commented 10 years ago

Seeing the process procedure returns values and I assume then non- blocking, it should also take a callback procedure to notify the user if the process has exited passing the exit code as an arguement.

waitpid is what you need. Take a look at ikarus/lab/process-example.ss and $ man 2 waitpid

Launchpad Details: #LPC Derick Eddington - 2007-12-20 14:53:49 -0500

hyln9 commented 10 years ago

On Dec 20, 2007, at 11:34 AM, leppie wrote:

Seeing the process procedure returns values and I assume then non- blocking, it should also take a callback procedure to notify the
user if the process has exited passing the exit code as an arguement.

Actually, all three ports are blocking, so you need to communicate with the subprocess in a proper way to avoid deadlock. I'm afraid the extra callback would introduce concurrency issues that I may not be prepared to tackle at the moment.

Launchpad Details: #LPC Abdulaziz Ghuloum - 2007-12-20 15:04:23 -0500

hyln9 commented 10 years ago

Would adding process-nonblocking (i.e., returns two ports that don't block on read/write) solve this issue?

Launchpad Details: #LPC Abdulaziz Ghuloum - 2008-03-24 23:07:00 -0400

hyln9 commented 10 years ago

I am not sure. I am not really familiar with the POSIX process API, only .NET (and that works pretty well, I could go into some info if you want some ideas, but without threading I dont think much will be possible, I could be wrong ;p )

Launchpad Details: #LPC leppie - 2008-03-25 11:52:38 -0400

hyln9 commented 10 years ago

Is there anything to do for this bug or has it been "fixed" somehow (by process-nonblocking and friends)?

Launchpad Details: #LPC Abdulaziz Ghuloum - 2008-11-16 04:56:16 -0500