Re: [Qemu-devel] [PULL v4 8/9] io: add QIOChannelCommand class

2016-01-08 Thread Paolo Bonzini
On 18/12/2015 13:21, Daniel P. Berrange wrote: > +#ifndef WIN32 > +static int qio_channel_command_abort(QIOChannelCommand *ioc, > + Error **errp) > +{ > +pid_t ret; > +int status; > +int step = 0; > + > +/* See if intermediate process has

Re: [Qemu-devel] [PULL v4 8/9] io: add QIOChannelCommand class

2016-01-08 Thread Paolo Bonzini
> > +static void qio_channel_command_finalize(Object *obj) > +{ > +QIOChannelCommand *ioc = QIO_CHANNEL_COMMAND(obj); > +if (ioc->readfd != -1) { > +close(ioc->readfd); > +ioc->readfd = -1; > +} > +if (ioc->writefd != -1) { > +close(ioc->writefd); > +

[Qemu-devel] [PULL v4 8/9] io: add QIOChannelCommand class

2015-12-18 Thread Daniel P. Berrange
Add a QIOChannel subclass that is capable of performing I/O to/from a separate process, via a pair of pipes. The command can be used for unidirectional or bi-directional I/O. Signed-off-by: Daniel P. Berrange --- include/io/channel-command.h| 91 ++