aboutsummaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2016-06-10 06:08:59 -0500
committerFurkan Sahin <furkan-dev@proton.me>2016-06-10 06:08:59 -0500
commitc31feac3acb9d2502eac2eb7def4c95b00fac199 (patch)
tree4f21665edd8078f60b7afacba9680672b87af597 /include/util.h
parent3e4c681a9fc0a4d6d8884aa3eca14a45f3d62667 (diff)
semi-working (only non-client/server wayland apps)
Diffstat (limited to 'include/util.h')
-rw-r--r--include/util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/util.h b/include/util.h
index dc47e343..6f21bff0 100644
--- a/include/util.h
+++ b/include/util.h
@@ -2,6 +2,7 @@
#define _SWAY_UTIL_H
#include <stdint.h>
+#include <unistd.h>
#include <wlc/wlc.h>
#include <xkbcommon/xkbcommon.h>
@@ -36,4 +37,11 @@ const char *get_modifier_name_by_mask(uint32_t modifier);
*/
int get_modifier_names(const char **names, uint32_t modifier_masks);
+/**
+ * Get the pid of a parent process given the pid of a child process.
+ *
+ * Returns the parent pid or NULL if the parent pid cannot be determined.
+ */
+pid_t get_parent_pid(pid_t pid);
+
#endif