[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
get_ppid_of: Add support for DragonFly BSD
From: |
Bruno Haible |
Subject: |
get_ppid_of: Add support for DragonFly BSD |
Date: |
Tue, 08 Jun 2021 03:42:28 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) |
DragonFly BSD has a /proc/<pid>/status file that looks like the FreeBSD one.
2021-06-07 Bruno Haible <bruno@clisp.org>
get_ppid_of: Add support for DragonFly BSD.
* lib/get_ppid_of.c: Treat DragonFly BSD like FreeBSD.
diff --git a/lib/get_ppid_of.c b/lib/get_ppid_of.c
index ed9f25f..f153b75 100644
--- a/lib/get_ppid_of.c
+++ b/lib/get_ppid_of.c
@@ -23,7 +23,7 @@
#include <stdio.h>
#include <string.h>
-#if defined __linux__ || defined __ANDROID__ || (defined __FreeBSD_kernel__ &&
!defined __FreeBSD__) || defined __GNU__ || defined __FreeBSD__ || defined
__NetBSD__ || defined __minix || defined __sun /* Linux, GNU/kFreeBSD,
GNU/Hurd, FreeBSD, NetBSD, Minix, Solaris */
+#if defined __linux__ || defined __ANDROID__ || (defined __FreeBSD_kernel__ &&
!defined __FreeBSD__) || defined __GNU__ || defined __FreeBSD__ || defined
__DragonFly__ || defined __NetBSD__ || defined __minix || defined __sun /*
Linux, GNU/kFreeBSD, GNU/Hurd, FreeBSD, NetBSD, Minix, Solaris */
# include <fcntl.h>
# include <unistd.h>
#endif
@@ -108,7 +108,7 @@ get_ppid_of (pid_t pid)
#endif
-#if defined __FreeBSD__ || defined __NetBSD__ /* FreeBSD, NetBSD
*/
+#if defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ /*
FreeBSD, NetBSD */
/* Read the contents of /proc/<pid>/status into memory. */
char filename[6 + 10 + 7 + 1];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- get_ppid_of: Add support for DragonFly BSD,
Bruno Haible <=