[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Retrying close() after error on Linux !?
From: |
Tim Rühsen |
Subject: |
Retrying close() after error on Linux !? |
Date: |
Wed, 14 Mar 2018 16:04:32 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 |
Hi,
just stumbled upon nonintr_close() in spawn-pipe.c which has this loop:
do
retval = close (fd);
while (retval < 0 && errno == EINTR);
Regarding the man page of libc, this shouldn't be done on certain
systems. E.g. it says the Linux kernel closes the file descriptor even
on EINTR. With the effect of possible race conditions in multi-threaded
code.
What do the experts here say ?
With Best Regards, Tim
signature.asc
Description: OpenPGP digital signature
- Retrying close() after error on Linux !?,
Tim Rühsen <=