Re: [PATCH v5 1/8] monitor: simplify functions for getting a dup'd fdset entry

2020-09-03 Thread Daniel P . Berrangé
On Thu, Sep 03, 2020 at 10:52:40AM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > Currently code has to call monitor_fdset_get_fd, then dup > > the return fd, and then add the duplicate FD back into the > > fdset. This dance is overly verbose for the caller and > > introduces

Re: [PATCH v5 1/8] monitor: simplify functions for getting a dup'd fdset entry

2020-09-03 Thread Markus Armbruster
Daniel P. Berrangé writes: > Currently code has to call monitor_fdset_get_fd, then dup > the return fd, and then add the duplicate FD back into the > fdset. This dance is overly verbose for the caller and > introduces extra failure modes which can be avoided by > folding all the logic into monito

[PATCH v5 1/8] monitor: simplify functions for getting a dup'd fdset entry

2020-09-02 Thread Daniel P . Berrangé
Currently code has to call monitor_fdset_get_fd, then dup the return fd, and then add the duplicate FD back into the fdset. This dance is overly verbose for the caller and introduces extra failure modes which can be avoided by folding all the logic into monitor_fdset_dup_fd_add and removing monitor