User forums > General (but related to Code::Blocks)

signals and exit(0) aren't interpreted correctly

<< < (3/3)

jarro_2783:
I don't care what msdn says, if you run the code you'll see what happens, it works, it handles the signal.
Maybe the writers of mingw implemented it.

mandrav:
I looked into this and it has to do with how wx handles signals under windows. You can find more about this in wx docs for ::wxKill().


--- Quote from: wx docs ---int wxKill(long pid, int sig = wxSIGTERM, wxKillError *rc = NULL, int flags = 0)

wxSIGNONE, wxSIGKILL and wxSIGTERM have the same meaning under both Unix and Windows but all the other signals are equivalent to wxSIGTERM under Windows.

--- End quote ---

Not much can be done.
OTOH, running in the debugger works as expected but that's gdb.

jarro_2783:
so does that mean my code is fine, and it's a problem with codeblocks (codeblocks using wx) and it can't be fixed?
It doesn't really matter because it thinks the program terminated when it didn't and gives the wrong return code. But that's fine because my program still works, so I don't really care what codeblocks thinks it did. It was just intriguing me as to why it did it.

Navigation

[0] Message Index

[*] Previous page

Go to full version