Re: command does not return



The python script needs to fork into the background and close stdin, stdout and
stderr.

ssh <ip> "nohup mycommand < /dev/null > /var/log/my.log 2>&1 &"

On Fri, Dec 26, 2008 at 4:38 AM, Laurent Mimoun <mimounl@xxxxxxxxx> wrote:
Hello,

My environnement is Debian Etch, and the version of ssh is 4.3p2.

I wrote a command <mycommand> that starts a python program. This
program calls a blocking method on a gamin monitor that waits for file
system changes (new files, for exemple).

I had to launch this python program (in mycommand) with "nohup" and
"&" at the end of the line because if not, mycommand is blocked.

Then when I enter the distant machine by writing only 'ssh <ip>' and
after connection, <mycommand> + ENTER, it returns correctly (I can
continue to write thing without to have to do crtl+c).

But when I launch the command like this : 'ssh <ip> <mycommand>', it
doesn't return.
It is blocked and I have to do ctrl+c to unblock. Furthermore, the
python program is correctly running on the distant machine.

Do you have any idea why 'ssh <ip> <mycommand>' is blocked ?




--
And, did Galoka think the Ulus were too ugly to save?
-Centauri



Relevant Pages

  • command does not return
    ... and the version of ssh is 4.3p2. ... I wrote a command <mycommand> that starts a python program. ... python program is correctly running on the distant machine. ...
    (SSH)
  • Re: why cannot assign to function call
    ... The Python program deals solely with references; ... when you say "the Python program", ... The value of an array is the ...
    (comp.lang.python)
  • Re: Py 2.5 on Language Shootout
    ... Alioth is a great site for selecting the language in which to implement ... Two of the alioth benchmarks, Partial-sums and Spectral-norm, could be ... program was in Python and there was a need to implement a similar ... Python program would be little less than a C program, ...
    (comp.lang.python)
  • import relative (with a directory)
    ... Recently for fun I've been working on a large Python program. ... to specify when I want the code in this project, ... level package name to avoid collisions from other packages. ...
    (comp.lang.python)
  • Re: SSH, remote login, and command output
    ... I'm working on a Python program for a small LAN of Linux systems running ... Twisted also includes SSH ... There are sshd implementations for Windows, ...
    (comp.lang.python)