From: torvalds@transmeta.com (Linus Torvalds)
To: linux-kernel@vger.kernel.org
Subject: Re: ptrace/select/signal errno weirdness
Date: 15 Aug 2002 21:03:52 -0700 [thread overview]
Message-ID: <ajhtj8$ns6$1@cesium.transmeta.com> (raw)
In-Reply-To: <Pine.LNX.4.44.0208151508060.21876-100000@spratly.nominum.com>
In article <Pine.LNX.4.44.0208151508060.21876-100000@spratly.nominum.com>,
Brian Wellington <bwelling@xbill.org> wrote:
>When sending a SIGINT to a ptraced process (run under gdb), an interrupted
>select() call returns with errno==514. linux/include/linux/errno.h says:
>
>/* Should never be seen by user programs */
>#define ERESTARTSYS 512
>#define ERESTARTNOINTR 513
>#define ERESTARTNOHAND 514 /* restart if no handler.. */
>#define ENOIOCTLCMD 515 /* No ioctl command */
>
>As gdb is a user program, and the printf is printing it, there's something
>wrong.
No, there's nothing wrong.
The process _itself_ never sees these magic error numbers, because they
are internal to the kernel, and the only time they are seen is by a
tracer that sees them - at the same time as the kernel backed up the
instruction pointer so that the traced process will not actually return
from the system call, it will re-do the system call.
Linus
next prev parent reply other threads:[~2002-08-16 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-15 22:16 Brian Wellington
2002-08-16 4:03 ` Linus Torvalds [this message]
2002-08-16 4:15 ` Brian Wellington
2002-08-16 5:41 ` Linus Torvalds
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='ajhtj8$ns6$1@cesium.transmeta.com' \
--to=torvalds@transmeta.com \
--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®