On Fri, Sep 02, 2022 at 03:18:59PM +0400, [email protected] wrote: > From: Marc-André Lureau <[email protected]> > > This is a fairly straightforward implementation of the equivalent UNIX > version. > > GLib uses _mkpipe() to setup the FDs. We take that for granted, and set > the underlying named-pipes to nonblocking. This is done by other > projects as well (found on github), but I am not confident this works > reliably (msdn SetNamedPipeHandleState documentation discourage this > usage).
Well if other projects do this, and our unit tests pass, then that is good enough for me, until someone complains with an example of where it fails. It is less broken that today where we disallow spawn entirely, so wont be a regression regardless :-) > Alternatively, we could setup the FDs ourself, and use UNIX sockets on > Windows, which can be used in blocking/non-blocking mode. I haven't > tried it, as I am not sure it is necessary. > > Signed-off-by: Marc-André Lureau <[email protected]> > --- > io/channel-command.c | 58 ++++++++++++++++++++++++++++---------------- > 1 file changed, 37 insertions(+), 21 deletions(-) Reviewed-by: Daniel P. Berrangé <[email protected]> With regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
