[Bug 13856] Wrong PID written by start-stop-daemon -S -b -m -p

bugzilla at busybox.net bugzilla at busybox.net
Wed Jun 16 10:19:40 UTC 2021


https://bugs.busybox.net/show_bug.cgi?id=13856

--- Comment #2 from Denys Vlasenko <vda.linux at googlemail.com> ---
(In reply to mwadsten from comment #0)
> This might be a compatibility issue with the 2.6.35 kernel, or whatever
> version of glibc is present on this platform. I am unable to reproduce
> this with a host build of the same code, running under WSL2
> (Ubuntu 20.04; Linux 5.4.72). I had a coworker try my reproduction on another,
> newer Linux-based system (kernel 5.x?), and we were unable to reproduce
> it there either. (That system also uses musl instead of glibc.)

I vaguely remember that glibc used to have a pid caching (mis)feature: to save
a few microseconds, they were remembering result of first getpid() call and
avoided a syscall if getpid() was called again.

Try
strace busybox lsof 2>&1 | grep getpid
to see whether "pid caching" is happening. If yes, you'll see only one getpid()
call.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the busybox-cvs mailing list