mbox series

[0/2] Two chardev with fdset fixes

Message ID cover.1629190206.git.mprivozn@redhat.com (mailing list archive)
Headers show
Series Two chardev with fdset fixes | expand

Message

Michal Privoznik Aug. 17, 2021, 8:56 a.m. UTC
I was working on libvirt, trying to make it pass a pre-opened FD for a
chardev's logfile. I've spent non-negligible amount of time trying to
figure out why I was getting EACCESS error when QEMU definitely was able
to access the FD. Well, found the problem and here is my attempt to save
future me from figuring it out again.

NB, I'm not fully convinced that EBADFD is the best value, but anything
is better than EACCESS.

Michal Privoznik (2):
  chardev: Propagate error from logfile opening
  monitor: Report EBADFD if fdset contains invalid FD

 chardev/char.c | 7 ++-----
 monitor/misc.c | 2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)