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.

Details

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