home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!bogus.sura.net!howland.reston.ans.net!sol.ctr.columbia.edu!The-Star.honeywell.com!umn.edu!noc.msc.net!news.stolaf.edu!guenther
- From: guenther@stolaf.edu (Philip A Guenther)
- Newsgroups: comp.unix.questions
- Subject: Re: Problems with /usr/ucb/rsh ISC3.0
- Message-ID: <GUENTHER.93Jan11132645@sachiko.stolaf.edu>
- Date: 11 Jan 93 19:26:55 GMT
- References: <1280@kommu.UUCP>
- Sender: news@news.stolaf.edu
- Organization: Academic Computing Center, St. Olaf College
- Lines: 33
- In-Reply-To: robert@kommu.UUCP's message of 11 Jan 93 06:30:47 GMT
-
- In article <1280@kommu.UUCP> robert@kommu.UUCP (3730) writes:
- I need some help with the Berkeley RSH.
- The problem description:
- A script is called like
- /usr/ucb/rsh host12 /usr/gast/script1
- script1 is calling another script2 which is reading
- from stdin via fscanf(..).
- When the script does this the script2 is hanging.
-
- script2 looks like this:
- ...
- program_x < some_data
- ...
-
- program_x is the program which reads via fscanf. some_data is the input.
-
- When the command /usr/ucb/rsh .... is started in the background ( ... &)
- I get the indication
-
- stopped tty input.
-
- The problem is that rsh continuely tries to read from the terminal.
- When you background it it receives SIGTTIN which stops it. If you
- give rsh the -n flag it will redirect it's own stdin to /dev/null (You
- can also do that manually with 'rsh foo script1 </dev/null') and it
- will continue to run even when backgrounded.
-
- Philip Guenther
- --
- guenther@stolaf.edu (Philip Guenther) | The ACC might agree with me,
- Student Sys Prog, Academic Computing Center | but with that bunch, (and me)
- St Olaf College, Northfield, MN 55057 | you never know... :-| :-( :-)
- "Life makes sense? LIFE MAKES SENSE!?!? Where do people get these ideas?"
-