Closed ghost closed 1 year ago
We can execute the commands directly rather than through another shell to avoid unnecessary nesting of shells.
By replacing
#define BLOCK(cmd, interval, signal) \ { "echo \"$(" cmd ")\"", interval, signal }
with
#define BLOCK(cmd, interval, signal) \ { cmd, interval, signal }
and
execl("/bin/sh", "sh", "-c", blocks[i].command, (char*)NULL);
execlp(blocks[i].command, (char*)NULL);
we can execute each block without the need of an extra shell.
I apologise for not having sent a PR, I have been having issues with Github recently.
Running the command in another shell is one unsatisfying workaround which I've had to live to with. It is discussed in more detail in #24. Therefore, I will be closing this in favour of that issue.
We can execute the commands directly rather than through another shell to avoid unnecessary nesting of shells.
By replacing
with
and
with
we can execute each block without the need of an extra shell.
I apologise for not having sent a PR, I have been having issues with Github recently.