NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: standards/51024 (NetBSD misses the mandatory waitid() syscall)



The following reply was made to PR standards/51024; it has been noted by GNATS.

From: Joerg Schilling <Joerg.Schilling%fokus.fraunhofer.de@localhost>
To: <wiz%netbsd.org@localhost>, <standards-manager%netbsd.org@localhost>, <netbsd-bugs%netbsd.org@localhost>,
        <gnats-bugs%netbsd.org@localhost>, <gnats-admin%netbsd.org@localhost>
Cc: 
Subject: Re: standards/51024 (NetBSD misses the mandatory waitid() syscall)
Date: Mon, 4 Apr 2016 14:48:49 +0200

 <wiz%netbsd.org@localhost> wrote:
 
 > Synopsis: NetBSD misses the mandatory waitid() syscall
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: wiz%NetBSD.org@localhost
 > State-Changed-When: Mon, 04 Apr 2016 11:25:27 +0000
 > State-Changed-Why:
 > Christos fixed this, can you confirm it's conformant now?
 
 Thank you for your work!
 
 I do not have netbsd installed, so I checked the sources.
 
 1)	I do not see any changes in the signal handling.
 	Is siginfo_t filled correctly in for the signalhandler
 	that handles SIGCHLD? It should deliver the same 
 	information as waitid() delivers, including the full 32 bits
 	from the exit() call in the child.
 
 2)	kern_exit.c does not look correct (complete).
 	If you really like to keep the deprecated wait status in the kernel,
 	you should use a more complete conversion code to convert the
 	deprecated wait status into siginfo_t. A correct piece of code
 	is in the compatibility code of the recent Bourne Shell:
 
 		http://schilytools.sourceforge.net/bosh.html
 
 	Source code is in the schily tools:
 
 		https://sourceforge.net/projects/schilytools/files/
 
 	Use latest *schily-*' tar archive.
 
 	Check the bottom of the file sh/jobs.c
 
 
 3)	From what I can tell, the new netbsd waitid() code only delivers
 	the low 8 bits from the exit() parameter. This is incorrect.
 
 	waitid() was introduced in 1989 by AT&T for SVr4 and defines to
 	deliver all 32 bits from the exit() call of the child.
 
 	Given that POSIX does not introcude own definitions but just
 	standardizes existing implementations, it should be obvious that
 	the SVID3 interface definitions apply to the POSIX waitid() call.
 
 	As a hint, here is the currenty valid relevant POSIX text:
 
 	**********
 	    the least significant 8 bits (that is, status & 0377) shall be 
 	    available from wait() and waitpid(); the full value shall 
 	    be available from waitid() and in the siginfo_t passed to a 
 	    signal handler for SIGCHLD. 
 	**********
 
 I hope that you are interested in full POSIX compliance with waitid() as
 waitid() is part of the basic set of interfaces. 
 
 Jörg
 
 -- 
  EMail:joerg%schily.net@localhost                    (home) Jörg Schilling D-13353 Berlin
        joerg.schilling%fokus.fraunhofer.de@localhost (work) Blog: http://schily.blogspot.com/
  URL:  http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/'
 



Home | Main Index | Thread Index | Old Index