2016-06-14 23:32:35 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common.hpp"
|
|
|
|
|
2016-11-19 00:22:44 -05:00
|
|
|
POLYBAR_NS
|
2016-06-14 23:32:35 -04:00
|
|
|
|
|
|
|
namespace process_util {
|
2016-11-02 15:22:45 -04:00
|
|
|
bool in_parent_process(pid_t pid);
|
|
|
|
bool in_forked_process(pid_t pid);
|
2016-06-14 23:32:35 -04:00
|
|
|
|
2020-05-06 16:28:05 -04:00
|
|
|
void redirect_process_output_to_dev_null();
|
|
|
|
|
2016-12-03 09:46:48 -05:00
|
|
|
void exec(char* cmd, char** args);
|
2016-12-03 14:52:42 -05:00
|
|
|
void exec_sh(const char* cmd);
|
2016-06-14 23:32:35 -04:00
|
|
|
|
2016-11-02 15:22:45 -04: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-14 23:32:35 -04:00
|
|
|
|
2016-11-02 15:22:45 -04:00
|
|
|
bool notify_childprocess();
|
2016-06-14 23:32:35 -04:00
|
|
|
}
|
|
|
|
|
2016-11-19 00:22:44 -05:00
|
|
|
POLYBAR_NS_END
|