Fix wsssht execution to use execvp for PATH search

- Replace execl with execvp to properly find wsssht in PATH
- Fixes 'No such file or directory' error
parent 8b4b0b00
......@@ -238,7 +238,8 @@ static wsssht_process_t *find_or_create_wsssht_process(const char *hostname, con
wsssht_path = "wsssht";
}
execl(wsssht_path, "wsssht", "--daemon", target, NULL);
char *argv[] = {"wsssht", "--daemon", target, NULL};
execvp("wsssht", argv);
exit(1); // Should not reach here
} else if (pid > 0) {
proc->pid = pid;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment