[master] 5dfbc6e2a vsm: Remove PID 1 expectation

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Fri Sep 27 06:25:06 UTC 2024


commit 5dfbc6e2a0532460522da6868e11762d26a6c3ea
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Fri Sep 27 08:19:31 2024 +0200

    vsm: Remove PID 1 expectation
    
    It turns out varnishd can be the main process of a Docker container when
    another process like varnishlog is 'docker exec'uted in the same PID
    namespace.
    
    Spotted by @gquintard.

diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index 39b601de4..e8a667eb4 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -494,7 +494,6 @@ vsm_running(struct vsm_set *vs, pid_t pid)
 
 	if (pid == 0)
 		return (0);
-	assert(pid > 1);
 
 	if (kill(pid, 0) == 0) {
 		vs->couldkill = 1;


More information about the varnish-commit mailing list