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

always wait childs to avoid zombies #38

Merged
merged 1 commit into from
Jun 15, 2020
Merged

always wait childs to avoid zombies #38

merged 1 commit into from
Jun 15, 2020

Conversation

iamleot
Copy link
Contributor

@iamleot iamleot commented Jun 15, 2020

Since 4.5 it seems that entr no longer properly wait for childs and
every time an event is triggered it left a zombie.

To reproduce this issue...
On a first terminal, let's create a file and invoke entr:

% touch /tmp/testing-entr ; echo /tmp/testing-entr | ./entr sh -c 'echo $$'

On another terminal let's trigger the running entr:

% echo "foo" >> /tmp/testing-entr
% echo "foo" >> /tmp/testing-entr
% echo "foo" >> /tmp/testing-entr

...and finally - always on the 2nd terminal - let's inspect
corresponding entr process and its zombies:

% ps aux
leot       5696  0.0  0.0   16028  1368 pts/7  S+    6:59PM 0:00.00 ./entr sh -c echo $$
leot      23501  0.0  0.0       0     0 pts/7  Z+         - 0:00.00 (sh)
leot      25071  0.0  0.0       0     0 pts/7  Z+         - 0:00.00 (sh)
leot      29677  0.0  0.0       0     0 pts/7  Z+         - 0:00.00 (sh)

@iamleot
Copy link
Contributor Author

iamleot commented Jun 15, 2020

Forgot to say but I have noticed that on NetBSD/amd64 -current but I would expect other operating systems acting the same.

@eradman
Copy link
Owner

eradman commented Jun 15, 2020

Good catch; thanks--the latest release is leaving dead processes. Some quick testing seems to indicate that this change is good

@eradman eradman merged commit 30cc34d into eradman:master Jun 15, 2020
@iamleot
Copy link
Contributor Author

iamleot commented Jun 15, 2020

Thank you Eric!

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

Successfully merging this pull request may close these issues.

2 participants