Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: Joe Buehler Subject: Cygwin rsh/socket bug? Date: Tue, 03 Jun 2003 14:38:35 -0400 Organization: Spirent Communications, Inc. Lines: 21 Message-ID: References: Reply-To: jbuehler AT hekimian DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT main DOT gmane DOT org User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4b) Gecko/20030507 X-Accept-Language: en-us, en In-Reply-To: X-Enigmail-Version: 0.75.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime > I cannot figure out how to get the job to detach -- the rsh always waits > for the job to finish, which is not what I want. I just want to fire up > a command on a remote machine and forget about it. E.g., the following hangs: rsh cygwin-machine 'some_command /dev/null 2>&1 &' (If I got something slightly wrong there, keep in mind that it's an example so you can see what I mean -- I am actually using a script that I have used for years on UNIX machines.) I got this to work properly by wrapping the remote command with a PERL script that invokes shutdown() on STDIN, STDOUT and STDERR and then close(). I assume this is some kind of bug in Cygwin or in.rshd -- all I have to do on UNIX machines is close() on the same descriptors and the rsh client disconnects as desired. -- Joe Buehler -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/