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

amfora leaves zombie processes #219

Closed
dm9pZCAq opened this issue Apr 8, 2021 · 5 comments
Closed

amfora leaves zombie processes #219

dm9pZCAq opened this issue Apr 8, 2021 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@dm9pZCAq
Copy link

dm9pZCAq commented Apr 8, 2021

as described in documentation cmd.Start doesn't wait for process completion and it's causes zombie processes

@makew0rld
Copy link
Owner

makew0rld commented Apr 8, 2021

Can you provide more information on why this is an issue? .Start is used because some processes may continue forever, and for all the processes Amfora calls, it doesn't care about how or when they finish.

Edit: I see how zombie processes should be avoided in general. I believe this can be solved by just adding go cmd.Wait() everywhere. Having some insight into why you made this issue would still be helpful though.

@makew0rld makew0rld added question Further information is requested enhancement New feature or request labels Apr 8, 2021
@makew0rld makew0rld added this to the v1.10.0 milestone Apr 8, 2021
@dm9pZCAq
Copy link
Author

dm9pZCAq commented Apr 8, 2021

i have this in config.toml:

http = ['sh', '-c', 'printf %s "${0}" | xclip -selection c']
# ...
[[mediatype-handlers]]
cmd = ['sxiv', '-a', '--']
types = ["image"]

and after opening some links and images remain zombies processes
img

i'm using setsid(2) in C and in Go should be something similar

@makew0rld
Copy link
Owner

Thanks. I will fix this, although not necessarily in the next release.

@makew0rld makew0rld removed the question Further information is requested label Apr 8, 2021
@makew0rld
Copy link
Owner

Let me know if you still experience this issue. The fix is now available in the master branch, and will be in the v1.10.0 release.

@dm9pZCAq
Copy link
Author

thank you, now it's fixed

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

No branches or pull requests

2 participants