patchmake - Patches: patch #3679, Clean handling of CTRL-C events on...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #3679: Clean handling of CTRL-C events on Windows

Submitted by:  None
Submitted on:  Mon 24 Jan 2005 03:30:07 PM UTC  
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  Paul D. Smith <psmith> Originator Email:  -email is unavailable-
Open/Closed:  Closed Fixed Release:  CVS

Tue 01 Mar 2005 03:20:40 PM UTC, comment #3: 

I applied Allesandro's fix.

Paul D. Smith <psmith>
Project AdministratorIn charge of this item.
Mon 28 Feb 2005 01:30:28 PM UTC, comment #2: 

Grepping 'kill[^a-z]*getpid' reveals only one use in w32
(the call in job.c is only for VMS). That call is executed
on Ctrl-C and might have caused bad behaviour because the
w32_kill expects a handle rather than a pid.

However, defining a macro for just one call is overkill,
so the patch I submit adds an ifdef.

Alessandro Vesely <ale2003>
Tue 25 Jan 2005 08:15:26 AM UTC, comment #1: 

After CreateProcess() there is

        pproc->pid = (int)procInfo.hProcess;

therefore the calls to kill arriving from
stored handles were correct as they were before.
OTOH, w32_kill is also called like so:

  if (kill (getpid (), sig) < 0)

which, on Windows 32, relies on (varying) C library
emulations.

A better approach, given the current situation,
could be to have a kill_me(sig) function to replace
the kill(getpid(),sig) constructs. Note that the
TerminateProcess() function should only be used for
killing processes that cannot be killed otherwise:
ExitProcess() kills the current process much more
cleanly.

Alessandro Vesely <ale2003>
Mon 24 Jan 2005 03:30:07 PM UTC, original submission:  

CTRL-C on Windows causes make to crash. This was because of the wrong implementation of w32_kill, dereferencing a pid as a pointer. The attached patch (targetting mingw32-make-3.80.0-3) fixes it

Anonymous

 

Attached Files
file #8492:  kill-patch.txt added by ale2003 (633B - text/plain - This avoids the only inconsistent use of w32_kill)
file #8311:  mingw32-make-3.80.0-3-w32ctrlc.patch added by None (433B - application/octet-stream - The patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

 

 

Follow 6 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-03-01 psmith StatusNone => Done
    Assigned toNone => psmith
    Open/ClosedOpen => Closed
    Fixed ReleaseNone => CVS
2005-02-28 ale2003 Attached File- => Added kill-patch.txt, #4254
2005-01-24 None Attached File- => Added mingw32-make-3.80.0-3-w32ctrlc.patch, #4087

Back to the top


Powered by Savane 3.5