rm invalid close call + document kernel API quirk