Re: Fw: sigwait() breaks when straced

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

 



The problem is not really "when straced", but when strace attaches.  In
fact, it's not even "when PTRACE_ATTACH'd".  It's actually the implicit
SIGSTOP that PTRACE_ATTACH causes.  If you simply suspend and resume the
program (with SIGSTOP or C-z), you get the same result.  So this report is
more properly identified as "signal stop breaks sigwait".  

However, there is in fact no bug here.  The test program is just wrong.
sigwait returns zero or an error number, as POSIX specifies.  Conversely,
sigtimedwait and sigwaitinfo either return 0 or set errno and return -1.
It is odd that the interfaces of related functions differ in this way,
but they do.


Thanks,
Roland


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux