[comp.sys.sun] how can I keep rsh from blocking?

mbp@lakisis.umd.edu (Mark Phillips) (10/11/89)

I want to use rsh to start a process on a remote host that runs in the
background, and I'd like the rsh command to return without waiting for the
remote process to terminate.  For example, I'd like to do something like
"rsh athena myprog \&", and I want the rsh command to return immediately
after having executed the command "myprog &" on athena.  When I do this,
however, the rsh command blocks until myprog has finished running on
athena.

In case it matters, I'm working in csh, and the version of "myprog"
which I've been testing this with is the following simple C program:
	main()
	{
	  pause();
	}

At first I thought the problem might have to do with the fact that the
standard I/O of the remote process is connected to the rsh command on the
local machine, but I when I experimented around with redirecting input and
output, I got the same result.  I also tried the -n option with no
success.

If I rlogin to the remote host, I can do "myprog &" and then logout, with
the final result being that only "myprog" is running on the remote host.
Can't I do this in a single command with rsh?

Thanks for any suggestions,

Mark Phillips			  mbp@lakisis.umd.edu
Department of Mathematics         (301) 454-6550
University of Maryland	          
College Park, Maryland  20742     
USA