Re: Question about trap
- From: Joel Fernandes <agnel.joel@xxxxxxxxx>
- Date: Fri, 26 Feb 2010 01:05:54 -0800 (PST)
|Normally, the termination value retrieved by wait() is a single integer,
|storing two values. One value, the process returncode, "consists of the
|least significant 8 bits of the status argument that the child specified
|in a call to exit(3) or _exit(2) or as the argument for a return statement
|in main()." The other value, the process signal number, is a single 7-bit
|value indicating which signal terminated the process (or 0 if the process
|terminated on its own). The signal number is stored in the low order 7 bits
|of the process termination status (mask 0x7f), and the process returncode
|is stored in bits 8 through 15 of the process termination status (mask
|0xff00).
And the missing bit, corresponding to that mysterious error_code=128, is the
"core dumped" bit, which makes sense for a SEGV.
If you don't mind could you please explain a little bit more about the
core dumped bit?
From your example, 128 = 0x00000001 0000000So the exit code of the process is 1 and the SIGNAL number is 0. Did I
get that right?
Thanks,
-Joel
.
- Follow-Ups:
- Re: Question about trap
- From: Alan Curry
- Re: Question about trap
- References:
- Question about trap
- From: Pete
- Re: Question about trap
- From: Lew Pitcher
- Re: Question about trap
- From: Alan Curry
- Question about trap
- Prev by Date: PAE enabled or not?
- Next by Date: Re: PAE enabled or not?
- Previous by thread: Re: Question about trap
- Next by thread: Re: Question about trap
- Index(es):