Re: SIGKILL
On 18 Mar, 01:27, Sam <s...@email-scan.com> wrote:
cerr writes:
Now I got a "child terminated with signal 9" on the
shell.... what does that mean, any clues? :o
It means SIGKILL, what your QA guy is telling you. SIGKILL is
signal 9. man pages are your friends. "man 7 signal",
orhttp://manpages.courier-mta.org/htmlman7/signal.7.html
According to Posix, it's not guaranteed. (But practically all
Unix do agree here.)
As you can see in the convenient table in the middle of the
man page, signal 9 is called =85 drumroll =85 SIGKILL. Who woulda
thunk it?
One thing about C++ -- bugs may not necessarily manifest
themselves right away. For various reasons, which are too
boring to go into, stomping on a few random bytes of memory,
or dereferencing an uninitialized pointer, may go completely
unnoticed at first. But, a long time later, an innocuous
change elsewhere in the program -- a few lines of added code,
or a few lines of removed code -- subtly changes the contents
of your compiled program in such a manner that the new
internal memory layout of the code, or a slightly different
heap allocation pattern, suddenly makes those few stomped
bytes of memory be something important. Result: an ugly crash,
and you're staring at the innocent bit of code that you just
changed, and wondering how the FRAK could that possibly change
anything?
A SIGKILL is *not* a crash, at least not on a normal Unix. A
SIGKILL is what you send when you want a program to terminate,
and it refuses to do so otherwise. Of course, it's quite
possible to generate a signal 9 from your own code. It's just
very unlikely to happen accidentally.
--
James Kanze