From mboxrd@z Thu Jan 1 00:00:00 1970 From: schily@schily.net (Joerg Schilling) Date: Tue, 03 Jan 2017 17:47:00 +0100 Subject: [TUHS] MacOS X is Unix (tm) In-Reply-To: <20170103160926.GA83502@cowbell.employees.org> References: <52C99F50-E24A-4BBF-A129-180A1271B4E3@kdbarto.org> <586a3a23.udW0nRrOopzHoQbP%schily@schily.net> <8168FD75-9C3E-47C1-9BA8-EADAD7D33C38@kdbarto.org> <1483454024.1265981.835921849.4F752F10@webmail.messagingengine.com> <586bbe88.njLSal35/ZSrGHMO%schily@schily.net> <20170103160926.GA83502@cowbell.employees.org> Message-ID: <586bd584.SKpA3hA4oaJSGLri%schily@schily.net> Derek Fawcus wrote: > FWIW, on 10.10.5 [1] this gives essentially the same result as the prior program, > the signal handler seeing the same sign extended 24 bit value: > > $ ./posix2 > received SIGCHLD (20), si_pid: 2281 si_status: -6946094 si_code: 1 > SIGCHLD: si_status in struct siginfo should be 1234567890 (0x499602d2) but is -6946094 (0xff9602d2) > ret: 0 si_pid: 2281 si_status: -6946094 si_code: 1 > si_status in struct siginfo should be 1234567890 (0x499602d2) but is -6946094 (0xff9602d2) OK, then the main change during the past 8 years was that Apple now includes the siginfo structure in sys/wait.h and that si_pid and si_code are now filled in. > Mind, one should probably assign the handler to sa.sa_sigaction, as someone > could implement the struct w/o both fields in a union. Done - thank you.... Jörg -- EMail:joerg at schily.net (home) Jörg Schilling D-13353 Berlin joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/