ochinchina / supervisord

a go-lang supervisor implementation
MIT License
4.03k stars 571 forks source link

Supervisord considers an exited process as still running #372

Open fhalde opened 1 year ago

fhalde commented 1 year ago

I have the following supervisord.conf

[program:X]
command=ls
startsecs=0
autorestart=false

I then try to list the program using the http server /program/list API and it says the program is still Running

[{"name":"A","group":"A","description":"pid 2977, uptime 0:03:25","start":1690812571,"stop":0,"now":1690812776,"state":20,"statename":"Running","spawnerr":"","exitstatus":0,"logfile":"/tmp/ls","stdout_logfile":"/tmp/ls","stderr_logfile":"","pid":2977}]

Any idea why isn't it in an exited state? On another note, if the program fails, the exitstatus is always shown as 0 from the above API

Is this a bug or known state transition?