Merge pull request #10935 from poettering/rlimit-nofile-safe
Merged by hand to resolve a trivial conflict in TODO.
This commit is contained in:
@@ -3553,7 +3553,7 @@ static int load_kexec_kernel(void) {
|
||||
if (arg_dry_run)
|
||||
return 0;
|
||||
|
||||
r = safe_fork("(kexec)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid);
|
||||
r = safe_fork("(kexec)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_RLIMIT_NOFILE_SAFE|FORK_LOG, &pid);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0) {
|
||||
@@ -6026,7 +6026,7 @@ static int enable_sysv_units(const char *verb, char **args) {
|
||||
if (!arg_quiet)
|
||||
log_info("Executing: %s", l);
|
||||
|
||||
j = safe_fork("(sysv-install)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid);
|
||||
j = safe_fork("(sysv-install)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_RLIMIT_NOFILE_SAFE|FORK_LOG, &pid);
|
||||
if (j < 0)
|
||||
return j;
|
||||
if (j == 0) {
|
||||
@@ -6921,7 +6921,7 @@ static int run_editor(char **paths) {
|
||||
|
||||
assert(paths);
|
||||
|
||||
r = safe_fork("(editor)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG|FORK_WAIT, NULL);
|
||||
r = safe_fork("(editor)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_RLIMIT_NOFILE_SAFE|FORK_LOG|FORK_WAIT, NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0) {
|
||||
@@ -8323,6 +8323,7 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
/* Hmm, so some other init system is running, we need to forward this request to
|
||||
* it. For now we simply guess that it is Upstart. */
|
||||
|
||||
(void) rlimit_nofile_safe();
|
||||
execv(TELINIT, argv);
|
||||
|
||||
return log_error_errno(SYNTHETIC_ERRNO(EIO),
|
||||
|
||||
Reference in New Issue
Block a user