]> granicus.if.org Git - procps-ng/commitdiff
tests: Conditionally add prctl to test process
authorCraig Small <csmall@enc.com.au>
Sat, 16 Apr 2016 23:09:41 +0000 (09:09 +1000)
committerCraig Small <csmall@enc.com.au>
Sat, 16 Apr 2016 23:09:41 +0000 (09:09 +1000)
prctl was already bypassed on Cygwin systems. This extends to
non-Linux systems such as kFreeBSD and Hurd.

References:
 https://bugs.debian.org/816237

NEWS
lib/test_process.c

diff --git a/NEWS b/NEWS
index e92355e742bbea78eb9b6bf4ec29bf5f202a5338..c044e61c2d2684b9a0ec146662a72b594614a7e1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ procps-ng-NEXT
   * ps: sort by cgroup Debian #692279
   * ps: display control group name with -o cgname
   * ps: Fallback to attr/current for context Debian #786956
+  * tests: Conditionally add prctl Debian #816237
 
 procps-ng-3.3.11
 ----------------
index 6e652ed5b61f945fe6c5e5be4a3289e275037a9e..6a4776c570061d0594f34a3f632fc59ef7167d92 100644 (file)
@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <signal.h>
-#ifndef __CYGWIN__
+#ifdef __linux__
 #include <sys/prctl.h>
 #endif
 #include "c.h"
@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
     sigaction(SIGUSR1, &signal_action, NULL);
     sigaction(SIGUSR2, &signal_action, NULL);
 
-#ifndef __CYGWIN__
+#ifdef __linux__
     /* set process name */
     prctl(PR_SET_NAME, MY_NAME, NULL, NULL, NULL);
 #endif