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

Wait for async command exit #1326

Merged
merged 1 commit into from
Mar 14, 2021
Merged

Conversation

juergenhoetzel
Copy link
Contributor

@juergenhoetzel juergenhoetzel commented Mar 14, 2021

This prevents the accumulation of zombie processes when using
async (&) event commands. Also log async command failures.

For example when using

filebrowser cmds add before_copy 'true&'

the following zombie processes remain after 3 copies:

 232983 pts/3    Z+     0:00 [true] <defunct>
 232989 pts/3    Z+     0:00 [true] <defunct>
 233001 pts/3    Z+     0:00 [true] <defunct>

🚨 Before submitting your PR, please read community, and indicate which issues (in any of the repos) are either fixed or closed by this PR. See GitHub Help: Closing issues using keywords.

  • DO make sure you are requesting to pull a topic/feature/bugfix branch (right side). Don't request your master!
  • DO make sure you are making a pull request against the master branch (left side). Also you should start your branch off our master.
  • DO make sure that File Browser can be successfully built. See builds and development.
  • DO make sure that related issues are opened in other repositories. I.e., the frontend, caddy plugins or the web page need to be updated accordingly.
  • AVOID breaking the continuous integration build.

This commit also logs failures of async commands:

[INFO] Nonblocking Command "false" failed: exit status 1

This prevents the accumulation of zombie processes when using
async (&) event commands. Also log async command failures.
@o1egl o1egl merged commit 6d5ceae into filebrowser:master Mar 14, 2021
Alsan pushed a commit to Alsan/filebrowser that referenced this pull request Aug 25, 2021
This prevents the accumulation of zombie processes when using
async (&) event commands. Also log async command failures.
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.

None yet

2 participants