On 2016-03-31 18:01, Brandon Allbery wrote: > On Thu, Mar 31, 2016 at 11:56 AM, Rainer Müller <[email protected]> wrote: > >> A better way could be to handle SIGINT/SIGQUIT in a custom handler and >> on reception of a signal, we would kill the child process and return the >> error {POSIX SIG SIGINT} as result of SystemCmd. However, I am unsure >> how we would force the child to terminate and if this can be done reliably. >> > > Seems to me you want an altered version of the old way: instead of printing > a message, set an "interrupted by user" flag and resume waiting for the > child, then ignore the child exit and return your "interrupted by user" > status.
Thank you for the input. Once you said this, it was quite easy to return the appropriate error code: http://trac.macports.org/changeset/147226 The only issue could be if the program does not end itself on receiving a SIGINT/SIGQUIT, then we will just wait until it terminates. Rainer _______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
