HomeFreeBSD

Fix pidfile_open(3) to handle relative paths with multiple components.

Description

Fix pidfile_open(3) to handle relative paths with multiple components.

r322369's use of basename(3) was incorrect and worked by accident so
long as the pidfile path was absolute or consisted of a single
component. Fix the basename() usage and add a regression test.

Reported by: 0mp
Reviewed by: cem
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D19728

Details

Provenance
markjAuthored on
Reviewer
cem
Differential Revision
D19728: Fix pidfile_open(3) for relative paths.
Parents
rS345595: MFC r339717, r339749, and r339809.
Branches
Unknown
Tags
Unknown