Commit 1e3001a
committed
git_open_cloexec(): use fcntl(2) w/ FD_CLOEXEC fallback
A platform might not support open(2) with O_CLOEXEC but may support
telling the same with fcntl(2) to flip FD_CLOEXEC bit on on an open
file descriptor. It is a fallback that is inherently racy and this
may not be worth doing, though.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 1b8ac5e commit 1e3001a
1 file changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1561 | 1561 | | |
1562 | 1562 | | |
1563 | 1563 | | |
1564 | | - | |
1565 | | - | |
| 1564 | + | |
| 1565 | + | |
1566 | 1566 | | |
1567 | | - | |
| 1567 | + | |
| 1568 | + | |
1568 | 1569 | | |
1569 | | - | |
1570 | | - | |
| 1570 | + | |
| 1571 | + | |
1571 | 1572 | | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
1572 | 1586 | | |
1573 | 1587 | | |
1574 | 1588 | | |
| |||
0 commit comments