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

use execl() instead of system() as possible fix for #52 #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

philfry
Copy link

@philfry philfry commented Mar 14, 2019

Hi,
I'm also afflicted with #52. The problem only occurs with system incronjobs, while user incrontabs are not affected.
In UserTable::OnEvent(…) these type of incronjobs are handled differently. Incrond fork()s and handles the logic in the child process. User incrontabs are invoked by jumping to UserTable::RunAsUser(…) which runs the specified command by execlp()ing, replacing the child process. System incrontabs' commands are run using system() which is basically another fork() and an execl() – leading to another child process and keeping the first child alive.
By replacing system() with execl() the first child should be replaced by the desired command and no additional incrond-processes should show up.
Please correct me if I'm wrong.

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.

1 participant