An update will be applied today, Nov30th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit 535633fa authored by Ben Boeckel's avatar Ben Boeckel
Browse files

clang-tidy: address `readability-isolate-declaration` lint

parent 83b20b65
...@@ -1879,7 +1879,8 @@ static void kwsysProcessDestroy(kwsysProcess* cp) ...@@ -1879,7 +1879,8 @@ static void kwsysProcessDestroy(kwsysProcess* cp)
int i; int i;
/* Temporarily disable signals that access ForkPIDs. We don't want them to /* Temporarily disable signals that access ForkPIDs. We don't want them to
read a reaped PID, and writes to ForkPIDs are not atomic. */ read a reaped PID, and writes to ForkPIDs are not atomic. */
sigset_t mask, old_mask; sigset_t mask;
sigset_t old_mask;
sigemptyset(&mask); sigemptyset(&mask);
sigaddset(&mask, SIGINT); sigaddset(&mask, SIGINT);
sigaddset(&mask, SIGTERM); sigaddset(&mask, SIGTERM);
...@@ -2567,7 +2568,8 @@ static void kwsysProcessKill(pid_t process_id) ...@@ -2567,7 +2568,8 @@ static void kwsysProcessKill(pid_t process_id)
/* Make sure the process started and provided a valid header. */ /* Make sure the process started and provided a valid header. */
if (ps && fscanf(ps, "%*[^\n]\n") != EOF) { if (ps && fscanf(ps, "%*[^\n]\n") != EOF) {
/* Look for processes whose parent is the process being killed. */ /* Look for processes whose parent is the process being killed. */
int pid, ppid; int pid;
int ppid;
while (fscanf(ps, KWSYSPE_PS_FORMAT, &pid, &ppid) == 2) { while (fscanf(ps, KWSYSPE_PS_FORMAT, &pid, &ppid) == 2) {
if (ppid == process_id) { if (ppid == process_id) {
/* Recursively kill this child and its children. */ /* Recursively kill this child and its children. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment