make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WINDOWS32 "Signal 127" due to a path in quotes bug


From: Paul D. Smith
Subject: Re: WINDOWS32 "Signal 127" due to a path in quotes bug
Date: Mon, 1 Aug 2005 22:37:57 -0400

%% "J. Grant" <address@hidden> writes:

  jg> Ok. thank you for explaining. So is the reason the two main.exe do
  jg> not terminate because my main.c program does not handle SIGINT?

I was assuming they don't terminate because the operating system
(Windows) is sending the SIGINT to only the "main" program (in this case
make), and not sending it to all the processes that make invokes.  In
other words, Windows doesn't have the concept of a process group or, at
least, it doesn't work the same way.

But, I know nothing about Windows so I don't know if my assumption is
accurate or not.

  jg> If so, I wonder why SIGINT (ctrl+C) terminates the two "main"
  jg> processes on GNU/Linux?

On a POSIX system, every signal has a default behavior: either the
signal is ignored or the process is killed.  If you don't define your
own handler for the signal, then the default behavior is invoked.

The default behavior for SIGINT is kill, so (on a POSIX system) unless
your program specifically registers a signal handler for SIGINT, it will
automatically be killed when the operating system sends the SIGINT.

Most of the time a program would register a handler for SIGINT in order
to clean up (that's what make itself does for example), then it would
die gracefully.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]