From: Stefan Dalibor <Stefan.Dalibor@informatik.uni-erlangen.de>
To: rc-owner
Subject: Interrupts in backquotes
Date: Fri, 15 Oct 1993 07:30:39 -0400 [thread overview]
Message-ID: <199310151130.AA03082@faui30.informatik.uni-erlangen.de> (raw)
Hi,
I want to execute a command via rsh on several hosts in a script;
some of the remote hosts are ill-behaving in a way that makes them
answer ping-requests but hanging forever once the rsh-command is
started :(. I tried to implement a timeout with a handler for SIGALRM -
this handler is called, but then the script aborts with the error
message
backquote read: Interrupted system call
What is the correct way to perform such actions? Or should there
perhaps be special treatment for EINTR when occuring in bqinput() (as
this is done in fdgchar())?
Thanks,
Stefan
This is rc-1.4 on SunOS 4.1.3 (gcc) and IRIX 4.0.5H (cc), snippets
from script:
. . .
. . .
timeout=10
fn sigalrm {
echo timeout
timedout=yeah
}
for(hanghost in $hostlist) {
if(/usr/etc/ping $hanghost 4 >/dev/null >[2=1]) {
timedout=no
{sleep $timeout; kill -ALRM $pid} & # timer started
timerpid=$apid
echo -n $hanghost^': '
res=`{rsh $hanghost '$HOME/bin/m88k/osv'; echo $status}
if(~ $timedout no) { # rsh succeeded
kill -INT $timerpid >[2]/dev/null
. . .
. . .
} else # timer expired
. . .
. . .
}
echo Done
Output from script:
; ./src/rc-1.4/rc-1.4-g bin/mstat
m41: SYSV88
m42: SYSV88
m43: timeout
backquote read: Interrupted system call
reply other threads:[~1993-10-25 18:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=199310151130.AA03082@faui30.informatik.uni-erlangen.de \
--to=stefan.dalibor@informatik.uni-erlangen.de \
/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;
as well as URLs for NNTP newsgroup(s).