implement unlink-while-open semantics