home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / question / 15425 < prev    next >
Encoding:
Internet Message Format  |  1993-01-11  |  1.8 KB

  1. 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
  2. From: guenther@stolaf.edu (Philip A Guenther)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: Problems with /usr/ucb/rsh ISC3.0
  5. Message-ID: <GUENTHER.93Jan11132645@sachiko.stolaf.edu>
  6. Date: 11 Jan 93 19:26:55 GMT
  7. References: <1280@kommu.UUCP>
  8. Sender: news@news.stolaf.edu
  9. Organization: Academic Computing Center, St. Olaf College
  10. Lines: 33
  11. In-Reply-To: robert@kommu.UUCP's message of 11 Jan 93 06:30:47 GMT
  12.  
  13. In article <1280@kommu.UUCP> robert@kommu.UUCP (3730) writes:
  14.    I need some help with the Berkeley RSH.
  15.    The problem description:
  16.    A script is called like 
  17.       /usr/ucb/rsh host12 /usr/gast/script1
  18.    script1 is calling another script2 which is reading
  19.    from stdin via fscanf(..).
  20.    When the script does this the script2 is hanging.
  21.  
  22.    script2 looks like this:
  23.    ...
  24.    program_x < some_data
  25.    ...
  26.  
  27.    program_x is the program which reads via fscanf. some_data is the input.
  28.  
  29.    When the command /usr/ucb/rsh .... is started in the background  ( ... &)
  30.    I get the indication 
  31.  
  32.    stopped tty input.
  33.  
  34. The problem is that rsh continuely tries to read from the terminal.
  35. When you background it it receives SIGTTIN which stops it.  If you
  36. give rsh the -n flag it will redirect it's own stdin to /dev/null (You
  37. can also do that manually with 'rsh foo script1 </dev/null') and it
  38. will continue to run even when backgrounded.
  39.  
  40. Philip Guenther
  41. --
  42. guenther@stolaf.edu (Philip Guenther)       | The ACC might agree with me,
  43. Student Sys Prog, Academic Computing Center | but with that bunch, (and me)
  44. St Olaf College, Northfield, MN 55057       | you never know... :-| :-( :-)
  45. "Life makes sense?  LIFE MAKES SENSE!?!?  Where do people get these ideas?"
  46.