mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-06 13:24:28 +02:00
parent
930a3f1d37
commit
78fa197b9f
@ -165,6 +165,10 @@ static Value ProcessSpawnImpl(struct msghdr *msgh, const Dictionary::Ptr& reques
|
|||||||
Log(LogWarning, "base", "Failed to renice child process.");
|
Log(LogWarning, "base", "Failed to renice child process.");
|
||||||
#endif /* HAVE_NICE */
|
#endif /* HAVE_NICE */
|
||||||
|
|
||||||
|
sigset_t mask;
|
||||||
|
sigemptyset(&mask);
|
||||||
|
sigprocmask(SIG_SETMASK, &mask, NULL);
|
||||||
|
|
||||||
if (icinga2_execvpe(argv[0], argv, envp) < 0) {
|
if (icinga2_execvpe(argv[0], argv, envp) < 0) {
|
||||||
char errmsg[512];
|
char errmsg[512];
|
||||||
strcpy(errmsg, "execvpe(");
|
strcpy(errmsg, "execvpe(");
|
||||||
@ -228,6 +232,10 @@ static Value ProcessWaitPIDImpl(struct msghdr *msgh, const Dictionary::Ptr& requ
|
|||||||
|
|
||||||
static void ProcessHandler(void)
|
static void ProcessHandler(void)
|
||||||
{
|
{
|
||||||
|
sigset_t mask;
|
||||||
|
sigfillset(&mask);
|
||||||
|
sigprocmask(SIG_SETMASK, &mask, NULL);
|
||||||
|
|
||||||
rlimit rl;
|
rlimit rl;
|
||||||
if (getrlimit(RLIMIT_NOFILE, &rl) >= 0) {
|
if (getrlimit(RLIMIT_NOFILE, &rl) >= 0) {
|
||||||
rlim_t maxfds = rl.rlim_max;
|
rlim_t maxfds = rl.rlim_max;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user