Date: Fri, 2 Jun 2017 08:48:50 -0700 (MST) From: BBlister <bblister@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: Wrong Handling of pid files (example: fcgiwrap) forces single user mode. Am I correct? Message-ID: <1496418530514-6189230.post@n6.nabble.com> In-Reply-To: <e1396bfd-df54-39ef-0ba6-efccb5052646@FreeBSD.org> References: <1496397748172-6189171.post@n6.nabble.com> <e1396bfd-df54-39ef-0ba6-efccb5052646@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
OK, I filled a report https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219724 If you issue onestart the bug is not triggered. Also, the bug with onerestart is not triggered all the time. For example, if you do rm /var/run/fcgiwrap/fcgiwrap.pid and then issue as root from the shell: /usr/local/etc/rc.d/fcgiwrap onerestart then you see usually: cat: /var/run/fcgiwrap/fcgiwrap.pid: No such file or directory Stopping fcgiwrap. kill: illegal process id: - Starting fcgiwrap. But, there is a race condition, because if you do a number of times: rm /var/run/fcgiwrap/fcgiwrap.pid and then debug the rc script with: rm /var/run/fcgiwrap/fcgiwrap.pid ; bash -x /usr/local/etc/rc.d/fcgiwrap onerestart you will eventually hit the single user mode, because the PID 1 is somewhere in the list: kill -TERM -- - 1 17009 17607 17654 1 1 1 1 1 86584 4245 5166 5929 80402 86559 if it is the first one like the previous example, then it will hit user mode immediately, otherwise the script may exit first before hitting the PID 1, like kill -TERM -- - 17009 17607 17654 1 1 1 1 1 86584 4245 5166 5929 80402 86559 -- View this message in context: http://freebsd.1045724.x6.nabble.com/Wrong-Handling-of-pid-files-example-fcgiwrap-forces-single-user-mode-Am-I-correct-tp6189171p6189230.html Sent from the freebsd-questions mailing list archive at Nabble.com.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1496418530514-6189230.post>