qgis / qgis-docker

Official Docker image for QGIS Server and Desktop
GNU Affero General Public License v3.0
75 stars 24 forks source link

Fix `waitfor` fcgi #77

Closed m-kuhn closed 1 year ago

m-kuhn commented 1 year ago

Problem statement:

docker run -d --rm opengisch/qgis-server
docker exec -it [container id] bash
... kill the fcgi process
... container is not killed and continues to run as a zombie ...

Analysis

docker run -d --rm opengisch/qgis-server
docker exec -it [container id] bash
root@88dc2b4c8c6c:~# pidof /usr/lib/cgi-bin/qgis_mapserv.fcgi
root@88dc2b4c8c6c:~# pidof qgis_mapserv.fcgi
27
m-kuhn commented 1 year ago

@daniviga does this look good to you (and do you have an explanation why)?

daniviga commented 1 year ago

LGTM, uhm, it's a bit weird, however a good reason it might be that process forks, so it looses reference to the original path.

Thanks for spotting this...

m-kuhn commented 1 year ago

LGTM, uhm, it's a bit weird, however a good reason it might be that process forks, so it looses reference to the original path.

Thanks for spotting this...

Possibly. As soon as you start a new process from the cli with full path it will be picked up by waitfor and the container exits when the process stops.