[147224] trunk/base/src/pextlib1.0/system.c
Rainer Müller
raimue at macports.org
Thu Mar 31 10:04:35 PDT 2016
On 2016-03-31 18:01, Brandon Allbery wrote:
> On Thu, Mar 31, 2016 at 11:56 AM, Rainer Müller <raimue at macports.org> 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
More information about the macports-dev
mailing list