Skip to content
  • Guillem Jover's avatar
    test: Close all descriptors before initializing them for closefrom() · dd0bdb58
    Guillem Jover authored
    On macOS, closefrom() only sets the close-on-exec flag, so we cannot
    check whether all file descriptors were closed, which means that if
    on entry our file descriptor table was filled after the 4th file
    descriptor, then we might fail the assertions for the flags for odd
    file descriptors which we expect to be closed.
    
    This can easily happen when running the test suite in parallel mode
    with «make -j8 check» for example.
    
    Closes: #23
    dd0bdb58