From: dann frazier <dannf@hp.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] salinfo_decode silent exit in older 2.4s
Date: Fri, 08 Apr 2005 21:23:43 +0000 [thread overview]
Message-ID: <1112995423.7189.133.camel@krebs.dannf> (raw)
[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]
I was playing with salinfo_decode on an older kernel (2.4.21 era) and it
would normally die silently right after exec.
This no longer happens because of a semantic difference that occurred in
later 2.4 kernels. Older 2.4s would return -EINTR when they wanted
userspace to try again, while current 2.4s use -ERESTARTSYS. (The
surrounding code is also somewhat different, but it looks like the idea
is the same).
If salinfo_decode detects an EINTR, it will silently exit the main loop.
This patch corrects the problem for me on older kernels, and should have
no effect for current kernels. Hopefully this is what the author
originally intended.
Signed-off-by: dann frazier <dannf@hp.com>
--- salinfo-0.7.orig/salinfo_decode.c Tue Oct 5 09:23:33 2004
+++ salinfo-0.7/salinfo_decode.c Fri Apr 8 15:06:40 2005
@@ -235,7 +235,7 @@
char filename[PATH_MAX];
if (read(fd_event, text, sizeof(text)) <= 0) {
if (errno == EINTR)
- ret = 0;
+ continue;
else
perror(event_filename);
goto out;
[-- Attachment #2: salinfo.patch --]
[-- Type: text/x-patch, Size: 324 bytes --]
--- salinfo-0.7.orig/salinfo_decode.c Tue Oct 5 09:23:33 2004
+++ salinfo-0.7/salinfo_decode.c Fri Apr 8 15:06:40 2005
@@ -235,7 +235,7 @@
char filename[PATH_MAX];
if (read(fd_event, text, sizeof(text)) <= 0) {
if (errno == EINTR)
- ret = 0;
+ continue;
else
perror(event_filename);
goto out;
next reply other threads:[~2005-04-08 21:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-08 21:23 dann frazier [this message]
2005-04-10 23:58 ` [PATCH] salinfo_decode silent exit in older 2.4s Keith Owens
2005-04-11 21:03 ` dann frazier
2005-04-11 23:03 ` Keith Owens
2005-04-13 19:51 ` dann frazier
2005-04-19 21:51 ` dann frazier
2005-04-20 0:04 ` Keith Owens
2005-04-20 2:14 ` dann frazier
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=1112995423.7189.133.camel@krebs.dannf \
--to=dannf@hp.com \
--cc=linux-ia64@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