Sun Studio 12: C User's Guide

(7.9.4.1) The effect of the remove function on an open file:

The file is deleted on the last call which closes the file. A program cannot open a file which has already been removed.