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...