• Marius Gerbershagen's avatar
    file.d: clean up ecl_stream_open · 3827daf4
    Marius Gerbershagen authored
    Previous implementation was messy and contained several race
    conditions (multiple open/close operations on the same file, first
    checking whether the file exists before opening it). We now always use
    a single open call and then optionally do an fdopen later
    on (exception being :rename which contains an unavoidable race
    condition between checking whether the file exists and then renaming
    it later on). Also improve error messages.