use enum retired_fd instead of -1