Arsen Arsenović <ar...@aarsen.me> writes: > Looking at ``check_output_alive'', this logic should be fairly easy to > reuse. Worst case, I'd need to refactor some of the code to handle the > non-pipe-check case more elegantly so that it doesn't become too > unreadable when also adding the logic to pick between poll and select.
Got some free time again. The more I think about how to do this, the more it feels like the solution involves a portable poll or poll-like function that gets translated to select() if need be on a given platform, which sounds an awful lot like Gnulib ;). The ``check_output_alive'' code checks for Gnulib poll and declares it incompatible, but I can't quite tell what incompatibility this is. I wonder if that can be fixed? If not, I can make factor out the check_alive logic and have it also check for file descriptors with input data. Sadly, I don't have many non-GNU and non-Linux systems to test for poll behavior on; just some (modern) Solaris and BSD VMs. Thanks in advance, have a lovely day. -- Arsen Arsenović
signature.asc
Description: PGP signature