Avoid close(-1)