delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/06/15/06:24:08

From: cgf AT cygnus DOT com (Christopher Faylor)
Subject: RE: SIGKILL and block_sig_dispatch
15 Jun 1998 06:24:08 -0700 :
Message-ID: <199806151255.IAA11947.cygnus.cygwin32.developers@kramden.cygnus.com>
To: cgf AT cygnus DOT com, sos AT prospect DOT com DOT ru
Cc: cygwin32-developers AT cygnus DOT com

>From: Sergey Okhapkin <sos AT prospect DOT com DOT ru>
>Date: Mon, 15 Jun 1998 16:38:05 +0400
>
>Christopher Faylor wrote:
>> Are you proposing that do_exit *always* runs in the context of the signal
>> handler?
>> 
>
>Yes, if the signal must terminate a process.

void
killme(int sig)
{
    exit(sig);
}

int
main(int argc, char **argv)
{
    signal(SIGALRM, killme);
    alarm(5);
    pause();
}

How do you determine that the exit() above should run from the signal thread?
--
cgf AT cygnus DOT com             "Everything has a boolean value, if you stand
http://www.cygnus.com/      far enough away from it."  -- Galena Alyson Canada

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019