Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

Re: Returning the prompt

zac80 wrote:

Martin, is there any way I can forward a command to the remote server such that WinSCP does not hang while the command is executed? Particularly, I would like to run the command "nohup ./file.bin &".

You can workaround syntactical problem with & by invoking the command from child shell, like:
/bin/sh -c "nohup ./file.bin &"
zac80

Returning the prompt

Martin, is there any way I can forward a command to the remote server such that WinSCP does not hang while the command is executed? Particularly, I would like to run the command "nohup ./file.bin &".
martin

Mercury wrote:

And what to do if I need to upload some file automatically and run some command (automatically, too)? Use two programs just for the sake of some "&"?

What about not using the &?
Mercury

And what to do if I need to upload some file automatically and run some command (automatically, too)? Use two programs just for the sake of some "&"?
martin

Re: And what to do?

Mercury wrote:

Well, how to circumvent this?
(I use WinSCP to start some task automatically, so I cannot use PuTTY)

Try plink from PuTTY package.
Mercury

And what to do?

Well, how to circumvent this?
(I use WinSCP to start some task automatically, so I cannot use PuTTY)
Mercury

Error while "call nohup command &"

When I try typing

> open somesession
> cd somedirectory
> call nohup somecommand &

WinScp outputs

> Searching for host...
> Connecting to host...
> Authenticating...
> Using username "someuser".
> Authenticating with pre-entered password.
> Authenticated.
> Starting the session...
> Reading remote directory...
> Session started.
> -sh: Syntax error: ";" unexpected
> Connection has been unexpectedly closed. Server sent command exit status 2.
> Session 'somesession' closed.
> No session.

The command DOES work in PuTTY. The reason is clearly "&" at the end of command.
What to do?