aboutsummaryrefslogtreecommitdiff
path: root/src/Process.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-12-10 19:42:01 +0100
committerdec05eba <dec05eba@protonmail.com>2024-12-10 19:42:01 +0100
commit4c83972a4f25a1918103e39ade4ef4d5b948db8a (patch)
tree337484ce3be29589422e2ade03c695f56f340827 /src/Process.cpp
parent0b9858f28ff0681d0fb08217aed6de710ae93902 (diff)
Timeout window creation position hack, force floating, disable 'all monitors' record option for nowHEADmaster
Diffstat (limited to 'src/Process.cpp')
-rw-r--r--src/Process.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Process.cpp b/src/Process.cpp
index a8e5fb5..a9c5103 100644
--- a/src/Process.cpp
+++ b/src/Process.cpp
@@ -29,7 +29,7 @@ namespace gsr {
debug_print_args(args);
- pid_t pid = vfork();
+ const pid_t pid = vfork();
if(pid == -1) {
perror("Failed to vfork");
return false;
@@ -38,7 +38,7 @@ namespace gsr {
signal(SIGHUP, SIG_IGN);
// Daemonize child to make the parent the init process which will reap the zombie child
- pid_t second_child = vfork();
+ const pid_t second_child = vfork();
if(second_child == 0) { // child
execvp(args[0], (char* const*)args);
perror("execvp");
@@ -68,7 +68,7 @@ namespace gsr {
debug_print_args(args);
- pid_t pid = vfork();
+ const pid_t pid = vfork();
if(pid == -1) {
close(fds[PIPE_READ]);
close(fds[PIPE_WRITE]);
@@ -95,7 +95,7 @@ namespace gsr {
int exec_program_get_stdout(const char **args, std::string &result) {
result.clear();
int read_fd = -1;
- pid_t process_id = exec_program(args, &read_fd);
+ const pid_t process_id = exec_program(args, &read_fd);
if(process_id == -1)
return -1;