You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 15, 2026. It is now read-only.
Thin fails to daemonize if a pid is reused as a tid, as in the following example.
$ thin start
...
/usr/lib/ruby/vendor_ruby/thin/daemonizing.rb:171:in `remove_stale_pid_file': tmp/pids/thin.3000.pid already exists, seems like it's already running (process ID: 1215). Stop the process or delete tmp/pids/thin.3000.pid. (Thin::PidFileExist)
from /usr/lib/ruby/vendor_ruby/thin/daemonizing.rb:42:in `daemonize'
from /usr/lib/ruby/vendor_ruby/thin/controllers/controller.rb:61:in `start'
from /usr/lib/ruby/vendor_ruby/thin/runner.rb:185:in `run_command'
from /usr/lib/ruby/vendor_ruby/thin/runner.rb:151:in `run!'
from /usr/bin/thin:6:in `<main>'
$ ps -efT | grep 1215
mysql 1181 1215 1 0 Sep28 ? 00:03:42 /usr/sbin/mysqld
...
Currently Process.running? method in daemonizing.rb uses Process.getpgid() != -1, but this check is incorrect because getpgid() succeeds for a valid tid.
Thin fails to daemonize if a pid is reused as a tid, as in the following example.
Currently
Process.running?method indaemonizing.rbusesProcess.getpgid() != -1, but this check is incorrect becausegetpgid()succeeds for a valid tid.