summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libcamera/process.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libcamera/process.cpp b/src/libcamera/process.cpp
index e816ee86..8311d274 100644
--- a/src/libcamera/process.cpp
+++ b/src/libcamera/process.cpp
@@ -373,7 +373,8 @@ void Process::died(int wstatus)
*/
void Process::kill()
{
- ::kill(pid_, SIGKILL);
+ if (pid_ > 0)
+ ::kill(pid_, SIGKILL);
}
} /* namespace libcamera */