From: Roland McGrath <roland@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Fw: sigwait() breaks when straced
Date: Sun, 31 Jul 2005 17:01:20 -0700 (PDT) [thread overview]
Message-ID: <20050801000120.1D00F180EC0@magilla.sf.frob.com> (raw)
In-Reply-To: Andrew Morton's message of Saturday, 30 July 2005 17:00:49 -0700 <20050730170049.6df9e39f.akpm@osdl.org>
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
next parent reply other threads:[~2005-08-01 0:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050730170049.6df9e39f.akpm@osdl.org>
2005-08-01 0:01 ` Roland McGrath [this message]
2005-08-01 0:12 ` Dave Airlie
2005-08-01 16:25 ` Jesper Juhl
2005-08-01 19:20 ` Ulrich Drepper
2005-08-01 7:09 ` Ulrich Drepper
2005-08-01 7:57 ` Roland McGrath
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050801000120.1D00F180EC0@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®