I wrote this patch to have 'split' use posix_spawn.
While writing it I realized that the setup for posix_spawnattr_t and
posix_spawn_file_actions_t takes many lines to check for errors. My
assumption is that these functions will almost never fail. If they do,
it is probably because of ENOMEM.
Not checking for errors would be wrong because, for example, not
dup2'ing the pipe file descriptor to become standard input would make
the program behave incorrectly.
Therefore, I'm considering a xposix-spawnattr and
xposix-spawn-file-action Gnulib module. But I haven't decided yet.
Collin