On Sat, 2009-11-14 at 21:09 +0100, Emanuele Pucciarelli wrote:
I have prepared a small patch to support Solaris 10 and Opensolaris' event port mechanism for both the ioloop and the notify subsystems. It seems to work fine for me, but I haven't conducted any extensive testing.
Does the configure check actually have to test that all the port_* functions work? If they exist in libc, aren't they guaranteed to work? If just their existence is enough, I'd just change the check to test to AC_CHECK_FUNC(port_associate, ..).
Why do you call it fen / file event notification? It seems to be called just "port" in the man pages and everywhere else, so I'd call it that.
Why do you silently handle EBADFs and ENOENTs? Are those actually happening in your system? Dovecot should never close fds before removing them from ioloop, other ioloops also log an error if that happens.
For port_getn() error handling I'd probably do the same as all other ioloops: Ignore EINTR/ETIME and treat everything else as fatal. What's the idea behind BAD_PORTEV_USER?
In general when an error that really shouldn't happen does happen I prefer to fatal/panic than trying to limp along.
- io->path = i_new(char, strlen(path)+1);
- strcpy(io->path, path);
io->path = i_strdup(path);