Re: Handle SIGINT in C and Python (Posting On Python-List Prohibited)

2018-01-31 Thread eryk sun
On Thu, Feb 1, 2018 at 4:57 AM, Victor Porton wrote: > Lawrence D’Oliveiro wrote: > >> On Thursday, February 1, 2018 at 8:10:24 AM UTC+13, Victor Porton wrote: >>> Lawrence D’Oliveiro wrote: >>> The usual behaviour for POSIX is that the call is aborted with EINTR after

Re: Handle SIGINT in C and Python (Posting On Python-List Prohibited)

2018-01-31 Thread Victor Porton
Lawrence D’Oliveiro wrote: > On Thursday, February 1, 2018 at 5:57:58 PM UTC+13, Victor Porton wrote: >> I meant to call poll() from C code, not Python code. > > Do you need to use C code at all? Python is quite capable of handling this > . I

Re: Handle SIGINT in C and Python (Posting On Python-List Prohibited)

2018-01-31 Thread Victor Porton
Lawrence D’Oliveiro wrote: > On Thursday, February 1, 2018 at 8:10:24 AM UTC+13, Victor Porton wrote: >> Lawrence D’Oliveiro wrote: >> >>> The usual behaviour for POSIX is that the call is aborted with EINTR >>> after you get the signal. >> >> That poll() is interrupted does not imply that

Re: Handle SIGINT in C and Python (Posting On Python-List Prohibited)

2018-01-31 Thread Victor Porton
Lawrence D’Oliveiro wrote: > On Wednesday, January 31, 2018 at 9:55:45 PM UTC+13, Victor Porton wrote: >> Lawrence D’Oliveiro wrote: >> >>> On Wednesday, January 31, 2018 at 8:58:18 PM UTC+13, Victor Porton >>> wrote: For this reason I cannot use Python signals because "A Python signal

Re: Handle SIGINT in C and Python (Posting On Python-List Prohibited)

2018-01-31 Thread Victor Porton
Lawrence D’Oliveiro wrote: > On Wednesday, January 31, 2018 at 8:58:18 PM UTC+13, Victor Porton wrote: >> For this reason I >> cannot use Python signals because "A Python signal handler does not get >> executed inside the low-level (C) signal handler. Instead, the low-level >> signal handler sets