> The the way things are done in the current version of Chicken is wonky > because the outline is like this: > > child = fork(); > if (!child) { > // This code runs in the child process. > execve(exefile, argv, envp); > // Not only is the errno value not returned to the parent, > // but there is no call to exit() at all. So the child > // keeps running the user's Scheme program after a failed > // execve() until the program error-exits. Since the parent > // also continues running the Scheme program, there are now > // two copies of it running concurrently. > } >
If the execve fails, an exception is thrown - so doing that already indicates that the user has something particular in mind. I understand that the situation of having 2 different processes handling this scenario is rather icky, yet it is essentially a UNIXism that one has to deal with, regardless of language (which doesn't mean that it couldn't be improved, of course). felix _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers