[prev in list] [next in list] [prev in thread] [next in thread] 

List:       macports-dev
Subject:    Re: [147224] trunk/base/src/pextlib1.0/system.c
From:       Rainer_Müller <raimue () macports ! org>
Date:       2016-03-31 17:04:35
Message-ID: 56FD58A3.2090808 () macports ! org
[Download RAW message or body]

On 2016-03-31 18:01, Brandon Allbery wrote:
> On Thu, Mar 31, 2016 at 11:56 AM, Rainer Müller <raimue@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
_______________________________________________
macports-dev mailing list
macports-dev@lists.macosforge.org
https://lists.macosforge.org/mailman/listinfo/macports-dev

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic