-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Call the external helper instead of running the reaper process in the memory cloned from the mxq main process. - init_child_process() was used to initialize the user process forked from the reaper. We now do the same things in the reaper process itself because we no longer fork the user process in this program, the external reaper image will do that. The settings we do now to the reaper process will be inherited by the user process. - As before we need to change our effective user ident before we chdir into the cwd of the job and open the output files for the user. But we keep the real user ident, so that we can change back to root later. - user_process() now exec()s the external helper with the required arguments instead of the user image directly. Before we do so, we need to change our UIDs back to root. The external helper needs privileges to write the spool file. - The functionxtality to wait for the user process and write the spool file is removed, this is now done by the helper. - In the absense of errors, the function reaper_process() will no longer return. Note: We don't free new_argv in user_process, because we will exec() or _exit() anyway.
- Loading branch information
Showing
1 changed file
with
29 additions
and
92 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