Always use the safe open() call
authorSimon Marlow <marlowsd@gmail.com>
Mon, 11 Dec 2017 17:56:09 +0000 (12:56 -0500)
committerBen Gamari <ben@smart-cactus.org>
Mon, 11 Dec 2017 19:58:20 +0000 (14:58 -0500)
commit56fbfb3023b66d785cbfe1b33c6d8052d9205514
tree4bd7ee107f11425323ffc92010ffd3c275165565
parent2278c4c752717d2a5784ac4fe6a41a051225d1b8
Always use the safe open() call

open() can sometimes take a long time, for example on NFS or FUSE
filesystems.  We recently had a case where open() was taking multiple
seconds to return for a (presumably overloaded) FUSE filesystem, which
blocked GC and caused severe issues.

Test Plan: validate

Reviewers: niteria, bgamari, nh2, hvr, erikd

Reviewed By: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #13296

Differential Revision: https://phabricator.haskell.org/D4239

(cherry picked from commit cafe98345cb5d4b11f2059d60d2f20e976ef4f2a)
libraries/base/GHC/IO/FD.hs