> How do you handle errors signaled by the 'process' procedure from the > (chicken process) module in Chicken 5? > > When I try things like > > (receive (from-child to-child child) > (condition-case > (process command args) > (_ () > (values #f #f #f))) > ...) > > I get weird results - I have some 'display' calls, and according to > 'current-process-id' some of them are coming from a different PID (I > assume 'process' does fork/exec internally, so somehow some of the > display code actually ends up running in the forked child process. > > I guess normally the unix execve() call succeeds so the child process > stops running the Chicken programs and executes the desired command. But > when execve() fails (e.g. due to a missing executable file) then the > child process continues running Chicken code instead of exiting?
*Normally*, closing both ports returned from "process" will do a waitpid(2) (or the equivalent) and throw an exception if WIFEXITED returns false. Somehow I can't make this work - may this be broken? felix _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
