posix_spawn: add closefrom non-portable action
(cherry picked from commit a18ddf775744f31a844fd01fbe90207f7c5e706d)