HomeFreeBSD

split: reset errno prior to getline()

Description

split: reset errno prior to getline()

Something else may have set errno, breaking the post-getline() logic
that tries to detect the getline() error. This was initially noted in
a jail on a system that has HPET, in a jail that does not expose
/dev/hpet0 -- we see an earlier error in libc's vdso bits.

Fixes: 5c053aa3c5e90 ("split: switch to getline() [...]")
(cherry picked from commit 172be8642d93851b0c083d0db240cf35fd56ab0e)

Details

Provenance
sigsys_gmail.comAuthored on Oct 27 2022, 5:01 PM
kevansCommitted on Nov 11 2022, 6:08 PM
Parents
rG6b628a694d88: split: add word order fix
Branches
Unknown
Tags
Unknown