[systemd-devel] Bug in source_io_register?

Zbigniew Jędrzejewski-Szmek zbyszek at in.waw.pl
Mon Oct 14 07:10:02 PDT 2013


On Sun, Oct 13, 2013 at 10:24:17PM -0700, David Strauss wrote:
> source_io_register errors out with EEXIST, but that's supposed to be
> harmless for epoll [1]:
> 
> Q1: What happens if you add the same fd to an epoll_set twice?
> A1: You will probably get EEXIST. However, it is possible that two
> threads may add the same fd twice. This is a harmless condition.
Shouldn't a "new" fd be handled by one thread always, making
this scenario unlikely?

Zbyszek


More information about the systemd-devel mailing list