Rsh and background execution PB

Donn Cave donn at u.washington.edu
Tue Jun 10 19:03:15 CEST 2003


Quoth jcazier at decode.is (jean-Baptiste Cazier):
| I am trying to run a python script in the background executing
| regurlary a remote command.
| However if I try to run the script in the background, it is suspended
| as soon as it starts. But it works fine in the foreground.

I predict the problem will go away if you add "-n" to the rsh command.

The problem is that rsh may be used to send data in either direction,
this is determined by the applications on either end and rsh has no
way to know if the application on the other end is or is not waiting
for input.  So by default it reads, and tries to send what it gets,
or given -n it doesn't.

That helps when it's a background job in a Berkeley job control setup
like this, where the tty driver stops jobs that try to read from the
background.  It also helps when the data in input stream is intended
for some other subsequent command, and you don't want rsh to read it
up and discard it.

	Donn Cave, donn at u.washington.edu




More information about the Python-list mailing list