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)



On Apr 4, 10:08am, christos%zoulas.com@localhost (Christos Zoulas) wrote:
-- Subject: Re: standards/51024 (NetBSD misses the mandatory waitid() syscall

| Do you have the reference where it says it needs to preserve all 32 bits
| of exit code? I have not found one.

The reason I am asking all this is because although FreeBSD has made the
change to pass all 32 bits in this particular instance, they have overloaded
the meaning of si_status, so that now the user code needs to understand
what context we are in to interpret it properly. I.e.

- it could be a full 32 bit exit code
- it could be a signal number
- it could be a composite 'wait status' (as it is always now with NetBSD,
  except in the waitid case...).

kern_exit.c:                    siginfo->si_status = WTERMSIG(p->p_xsig);
kern_exit.c:                    siginfo->si_status = WTERMSIG(p->p_xsig);
kern_exit.c:                    siginfo->si_status = p->p_xexit;
kern_exit.c:                            siginfo->si_status = p->p_xsig;
kern_exit.c:                            siginfo->si_status = p->p_xsig;
kern_exit.c:                            siginfo->si_status = SIGCONT;
kern_sig.c:             p->p_ksi->ksi_status = status;

christos


Home | Main Index | Thread Index | Old Index