Re: use result of open(2) to check for presence
- From
- Morten Welinder <mwelinder@gmail.com>
- Date
- Jan 5, 2006, 14:48 UTC
- Message-ID
- <118833cc0601050648t17f68bcch8fd7c541585e965c@mail.gmail.com>
- In-Reply-To
- <81b0412b0601050343w4c00ac86y30569c3babbf6728@mail.gmail.com>
Neat, but perhaps you should check the fstat return code. It actually can fail, for example if the filesize cannot be represented in the structure because it is too big.
Morten