1
0
Fork 0
mirror of https://github.com/polybar/polybar.git synced 2025-02-17 15:55:20 -05:00
polybar/include/utils/process.hpp

25 lines
620 B
C++
Raw Normal View History

2016-06-15 05:32:35 +02:00
#pragma once
#include "common.hpp"
2016-11-19 06:22:44 +01:00
POLYBAR_NS
2016-06-15 05:32:35 +02:00
namespace process_util {
2016-11-02 20:22:45 +01:00
bool in_parent_process(pid_t pid);
bool in_forked_process(pid_t pid);
2016-06-15 05:32:35 +02:00
2016-12-03 15:46:48 +01:00
void exec(char* cmd, char** args);
2016-12-03 20:52:42 +01:00
void exec_sh(const char* cmd);
2016-06-15 05:32:35 +02:00
2016-11-02 20:22:45 +01:00
pid_t wait_for_completion(pid_t process_id, int* status_addr, int waitflags = 0);
pid_t wait_for_completion(int* status_addr, int waitflags = 0);
pid_t wait_for_completion(pid_t process_id);
pid_t wait_for_completion_nohang(pid_t process_id, int* status);
pid_t wait_for_completion_nohang(int* status);
pid_t wait_for_completion_nohang();
2016-06-15 05:32:35 +02:00
2016-11-02 20:22:45 +01:00
bool notify_childprocess();
2016-06-15 05:32:35 +02:00
}
2016-11-19 06:22:44 +01:00
POLYBAR_NS_END