-
Notifications
You must be signed in to change notification settings - Fork 353
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Catch runaway forked children from Lua scriptlets centrally
Commit 2d418ad added a safety catch for runaway children from package scriptlets, but we have many other ways to run Lua scriptlets too, and runaway children are equally harmful in them all. Catch them all centrally by wrapping lua_pcall() instead. Besides handling more cases, there are a couple of more subtle improvements here: rpmlog() in a child process is undefined behavior due to the locking it does, but also nonsensical - rpmlog() is more than fprintf() and any warnings/errors it collects end up in the wrong process. Check and log from the parent instead. Finally, make it a warning instead of an error because we're not failing the scriptlet because of this, and make the message more generic as besides exec(), this can be avoided by waiting for the child in the script too.
- Loading branch information
Showing
2 changed files
with
26 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters