incomplete si_codes for waitid(2) [patch available]
Hi,
In a program I was debugging, waitid(2) returned a strange value in siginfo_t structure's si_code field. It was different that those stated in the man page for waitid(2) [ waitid(2) man page is the same as wait(2) ].
When I looked at the relevant file "/usr/include/bits/siginfo.h" there were two more values for si_code:
CLD_DUMPED, /* Child terminated abnormally. */
CLD_TRAPPED, /* Traced child has trapped. */
I was getting CLD_DUMPED value along with core dumps so I state that as an example in the patch. I'm not sure about how a process can get CLD_TRAPPED but I include it for completeness' sake.
The diff applies to today's git version.
============================== diff ======================
man2/wait.2 +4 -0
@@ -310,6 +310,10 @@ Set to one of: .BR _exit (2)); .B CLD_KILLED (child killed by signal); +.B CLD_DUMPED +(child terminated abnormally, ie. core dump); +.B CLD_TRAPPED +(child has trapped while being traced); .B CLD_STOPPED (child stopped by signal); or .B CLD_CONTINUED
==========================================================
Signature · 6 lines
Gokdeniz Karadag -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi,
Quoted 9 lines · Gokdeniz Karadag
Hi,
In a program I was debugging, waitid(2) returned a strange value in
siginfo_tstructure'ssi_codefield. It was different that those stated in the man page for waitid(2) [ waitid(2) man page is the same as wait(2) ].When I looked at the relevant file "
/usr/include/bits/siginfo.h" there were two more values forsi_code:
Quoted 8 lines
CLD_DUMPED, /* Child terminated abnormally. */
CLD_TRAPPED, /* Traced child has trapped. */I was getting
CLD_DUMPEDvalue along with core dumps so I state that as an example in the patch. I'm not sure about how a process can getCLD_TRAPPEDbut I include it for completeness' sake.The diff applies to today's git version.
Thanks for spotting that. I tweaked your patch a little to make the text as follows:
[[
.B CLD_DUMPED
(child killed by signal, and dumped core);
.B CLD_TRAPPED
(traced child has trapped); or
]]
The change will be in man-pages-3.22.
Thanks,
Michael
Quoted 25 lines
============================== diff ======================
man2/wait.2 +0
-0@@ -310,6 +310,10 @@ Set to one of: .BR _exit (2));.B
CLD_KILLED
(child killed by signal);
+.BCLD_DUMPEDman2/wait.2 +3
-0+(child terminated abnormally, ie. core dump); +.B CLD_TRAPPED +(child has trapped while being traced);.B
CLD_STOPPED
(child stopped by signal); or
.BCLD_CONTINUED==========================================================
--
Gokdeniz Karadag
Signature · 9 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html