Simply touch the swapfile every 60 seconds. Any swap files that have not had their time updated within the last 120 seconds get removed. In the unlikely (but still possible) event that a swapfile is removed before its time, due say to a nfs network outage, you simply find youself in the situation you would have been with unlink() Julian.