Bug#926896: sysvinit-utils: pidof is unreliable

Svante Signell svante.signell at gmail.com
Sat Oct 23 15:49:43 BST 2021

On Sat, 2021-10-23 at 11:22 -0300, Jesse Smith wrote:
> This is getting bogged down in the weeds and not related to whether
> the readlink() patch works or not. The PATH_MAX usage is unrelated to
> the fix.
> However, since you asked, PATH_MAX is set to 2048 in pidof.
> Using get_current_dir_name() is not a valid way to do it as it is not
> portable across C libraries.

Well getcwd (NULL, 0) is supported by all glibc-based distributions.
This is an extension of POSIX.1-2001, see man getcwd. 

get_current_dir_name() is a GNU extension, see the same man page.


More information about the Debian-init-diversity mailing list