summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/watch.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Utilities/watch.cpp b/Userland/Utilities/watch.cpp
index 475984f3d4..4d9f9ce6c3 100644
--- a/Userland/Utilities/watch.cpp
+++ b/Userland/Utilities/watch.cpp
@@ -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");