OpenBSD CVS

CVS log for src/usr.bin/touch/touch.c


[BACK] Up to [local] / src / usr.bin / touch

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_7_5_BASE


Revision 1.27 / (download) - annotate - [select for diffs], Sat Jan 29 00:06:26 2022 UTC (2 years, 4 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, HEAD
Changes since 1.26: +11 -2 lines
Diff to previous 1.26 (colored)

touch(1): don't leak file descriptor if futimens(2) fails

This conditional chain short-circuits if futimens(2) fails, leaving the
file descriptor open.  We need to evaluate each system call in the chain
separately to ensure we attempt to close(2) the descriptor.

With input from guenther@ and millert@.

Thread: https://marc.info/?l=openbsd-tech&m=164332809900558&w=2

ok millert@, probably ok guenther@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.