When the CB debugger is stopped, my file manager is killed, clearing the desktop and all applications.
I thought this was fixed?
My CB rev is 3194.
Quote from: bnilsson on November 08, 2006, 06:45:18 PM
I thought this was fixed?
I thought so too, was this with the patched wxWidgets ?
http://www.algonet.se/~afb/wx/wxWidgets-killpoll.patch
Also, if this is the same as the previous bug, it is not just the file manager (Finder.app) but the entire session manager (Login.app) - which is much more severe, and loses more data. :-(
http://developer.berlios.de/bugs/?func=detailbug&bug_id=8950&group_id=5358
Hmm, just thought about it and the patch was only for Intel anyway...
We'll need to add some safety checks to the "debugger stop" command!
Hmm, sending a SIGKILL to PID=-1 will also do that you mention:
The following pids have special meanings:
-1 If superuser, broadcast the signal to all processes; otherwise
broadcast to all processes belonging to the user.
This seems to be a pretty nasty setup, considering what wxMac does:
// 0 means execution failed. Returning non-zero is a PID, but not
// on Mac where PIDs are 64 bits and won't fit in a long, so we
// return a dummy value for now.
return ( err == noErr ) ? -1 : 0;
// Semi-macros used for return value of wxMacExecute
const long errorCode = ((flags & wxEXEC_SYNC) ? -1 : 0);
const long successCode = ((flags & wxEXEC_SYNC) ? 0 : -1); // fake PID
Add a Code::Blocks that only checks for PID=0, and you have a problem...
I can confirm that sending a kill -INT -1 does precisely what bnilsson reports here...
WARNING: do not try this at home, since all programs will quit without saving first!