In Jehanne, I decided to test both: if the queue is not closed there's no need to check up->errstr.
Thanks for your help! Giacomo 2017-05-15 18:12 GMT+02:00 Charles Forsyth <charles.fors...@gmail.com>: > > On 15 May 2017 at 16:46, Giacomo Tesio <giac...@tesio.it> wrote: > >> Shouldn't the waserror code check that the queue has been actually closed? > > > Either that or check errstr against Ehungup, since that's the exact error > it incurred. > The latter has the advantage of not obscuring a different error if the > pipe is closed > between the write and waserror, but with pipes there's not much except > interrupt, I suppose, > so it seems a minor race and perhaps the qclosed check is adequate. >