1
Fork 0
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:
junior rantila 2021-10-03 14:06:27 +02:00 committed by Andreas Kling
parent 1071e4cf78
commit 769091fc1a

View file

@ -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");