Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background processes with nohup needs sleep to work #1158

Closed
AudriusButkevicius opened this issue Jul 9, 2014 · 1 comment
Closed

Background processes with nohup needs sleep to work #1158

AudriusButkevicius opened this issue Jul 9, 2014 · 1 comment

Comments

@AudriusButkevicius
Copy link

Something interesting I've found.

When doing:

run("nohup sleep 10 &>/dev/null & disown")
run("pgrep sleep")

it doesn't work:

[127.0.0.1] Executing task 'setup'
[127.0.0.1] run: nohup sleep 10 &>/dev/null & disown
[127.0.0.1] run: pgrep sleep

Fatal error: run() received nonzero return code 1 while executing!

Requested: pgrep sleep
Executed: /bin/bash -l -c "pgrep sleep"

Aborting.

though this does:

[127.0.0.1] Executing task 'setup'
[127.0.0.1] run: nohup sleep 10 &>/dev/null & disown; sleep 1
[127.0.0.1] run: pgrep sleep
[127.0.0.1] out: 1998

Tried adding channel.shutdown(2) before channel.close(), doesn't seem to help.
No clue.

@bitprophet
Copy link
Member

Duplicates #395 - is same core problem as far as I can tell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants