HomeFreeBSD

lockf: switch to strtonum() for parsing timeout

Description

lockf: switch to strtonum() for parsing timeout

Convert waitsec to a long long to be able to hold the full domain of
alarm(3) timeout on all platforms, and let strtonum(3) handle the input
validation. strtonum(3) also happens to provide a neater interface for
error handling, and it already includes our pre-existing empty input
check.

Sponsored by: Klara, Inc.

(cherry picked from commit e4967d4d48b0a7d873e4f778c0a6e560e09d4dc3)

Details

Provenance
kevansAuthored on Nov 26 2023, 4:27 AM
Parents
rG63b86eb6fa93: lockf: allow locking file descriptors
Branches
Unknown
Tags
Unknown