tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: WSTOPPED in <sys/wait.h>
On Fri, Apr 01, 2016 at 10:12:09AM +0700, Robert Elz wrote:
> Currently, (if XOPEN_SOURCE or NETBSD_SOURCE) <sys/wait.h>
> defines the symbol WSTOPPED as ...
> [...]
That all seems wrong, yes...
> ./external/bsd/libproc/dist/proc_bkpt.c:
> } else if (waitpid((proc_getpid(phdl), &status, WSTOPPED) == -1) {
>
> which is using WSTOPPED as if it were a flag, akin to WNOHANG, WNOWAIT (etc).
>
> That waitpid() call in proc_bkpt.c (about which I did not check to see if
> it is actually used for anything on NetBSD - that one line is all I have seen
> of the file) is effectively doing
>
> waitpid(xxx, &status, WNOHANG|WUNTRACED|WALTSIG|WALLSIG|0160);
>
> which I doubt is what it intends.
That will probably sorta-kinda work as intended because it contains
WUNTRACED, but it's definitely wrong.
Unless there's some other consideration I'm forgetting, 'delete' seems
like the right response.
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index