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

issue killing subprocesses using cd with failure at startup #768

Open
mjhoy opened this issue Jul 10, 2020 · 1 comment
Open

issue killing subprocesses using cd with failure at startup #768

mjhoy opened this issue Jul 10, 2020 · 1 comment

Comments

@mjhoy
Copy link

mjhoy commented Jul 10, 2020

Hello,

I've run into an interesting problem, and reduced to it what I think is a minimal case. I have the following Procfile (note this requires python 3.x to run):

server: cd inner && python -m http.server 8000
failure: sleep 1 && false

Running foreman start in a directory with an inner subdirectory (so the cd doesn't fail), I get:

% foreman start   
10:20:30 server.1  | started with pid 15205
10:20:30 failure.1 | started with pid 15206
10:20:32 failure.1 | exited with code 1
10:20:32 system    | sending SIGTERM to all processes
10:20:32 server.1  | terminated by SIGTERM

However, the server is still running:

% lsof -i tcp:8000
COMMAND     PID     USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
python3.7 15207 mikeyhoy    3u  IPv4 0xe5175633836f0ad9      0t0  TCP *:irdmi (LISTEN)

If I remove the cd inner && from the server child command, it works as expected, the subprocess getting terminated. Even more interestingly, if I remove the failure child, and exit foreman normally with Control-C, it correctly kills the subprocess. So it only seems to happen if another child process fails at startup.

Any ideas on what's going on?

Thanks.

EDIT: I'm using the current version,

% foreman --version
0.87.1
@dentarg
Copy link

dentarg commented Oct 28, 2022

Maybe due to #779? That issue has been addressed in overman, a foreman fork, see #780 (comment)

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