On 22/06/2016 17:09, Dr. David Alan Gilbert wrote: > > -static gboolean serial_xmit(GIOChannel *chan, GIOCondition cond, void > > *opaque) > > +static gboolean serial_watch_cb(GIOChannel *chan, GIOCondition cond, > > + void *opaque) > > { > > SerialState *s = opaque; > > + serial_xmit(s); > > + return FALSE; > > +} > > Yes, with a side question. > We register this with G_IO_OUT|G_IO_HUP but don't check the cond, what's this > code supposed to do if it gets a HUP?
It will attempt again to write, which will fail (see pty_chr_write); then attempt to add a watch again, which this time should return 0 (see pty_chr_add_watch). The outcome is that tsr_retry is reset to 0. Thanks, Paolo > Since we didn't do anything with cond before either: > > Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > >