Hi Matthew,
> Currently, if fork() fails on Unix (e.g., because there are too many > processes), then `subprocess` will raise an exception. But if fork() > succeeds, then there's normally no way to communicate an error from > exec() except through the exit code, since exec() is in the child > process.[*] So, that's why there's no way to distinguish "program > couldn't start" from "program exited with a non-0 status" on Unix. > > You're right that `subprocess` could make a distinction on Windows with > CreateProcess(). Currently, `subprocess` doesn't make a distinction, > mostly because not doing so makes the behavior somewhat more consistent > with conventional Unix behavior. > You're right, but wouldn't using the posix_spawn family have better semantics, better performance, and would allow to unify between POSIX and Windows behaviours nicely ? :) Cheers, Bertrand -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CAHV%3D05pMUvd2ASObfV_jrbJ0496PP0cZQcc31qyvFo47GwSQ%2Bg%40mail.gmail.com.

