mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
watch: VERIFY that command vector ends with nullptr
This commit is contained in:
parent
1071e4cf78
commit
769091fc1a
1 changed files with 2 additions and 0 deletions
|
@ -67,6 +67,8 @@ static void handle_signal(int signal)
|
|||
|
||||
static int run_command(Vector<char const*> const& command)
|
||||
{
|
||||
VERIFY(command[command.size() - 1] == nullptr);
|
||||
|
||||
if ((errno = posix_spawnp(const_cast<pid_t*>(&child_pid), command[0], nullptr, nullptr, const_cast<char**>(command.data()), environ))) {
|
||||
exit_code = 1;
|
||||
perror("posix_spawn");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue