hello, in my neverending search for the perfect browser i stumbled across dillo. it looks great and quite usable, altough it's still alpha. unfortunately dillo 0.7.0 won't run on solaris8 (ultra30), so i wrote a fix. turns out every other os is affected by this bug, too. solaris just seems to be less forgiving in this matter :) to compile on solaris you may also need some workarounds, take a look at bugreports 402, 413 and 415. problem: solaris: see bugreport 416, dillo enters endless loop on startup, repeating "IO_write: Changing io->Buf (0)" linux: no immediate effect, although some filedescriptors are in state "open" for too long. i've not really looked into it but this should have negative effects in the long run. reason: in IO.c, function IO_submit, filedescriptor-flag close_on_exec is not set the right way (not at all). on solaris, as a direct result, non-blocking io will accidentally be handled via O_NDELAY instead of O_NONBLOCKING, resulting in an endless loop. patch: *** IO.c.org Sat Mar 1 21:56:13 2003 --- IO.c Sat Mar 1 21:56:54 2003 *************** *** 530,536 **** /* Set FD to background and to close on exec. */ fcntl(r_io->FD, F_SETFL, ! O_NONBLOCK | FD_CLOEXEC | fcntl(r_io->FD, F_GETFL)); if ( r_io->Op == IORead ) { g_io_add_watch(r_io->GioCh, G_IO_IN | G_IO_ERR | G_IO_HUP, --- 530,538 ---- /* Set FD to background and to close on exec. */ fcntl(r_io->FD, F_SETFL, ! O_NONBLOCK | fcntl(r_io->FD, F_GETFL)); ! fcntl(r_io->FD, F_SETFD, ! FD_CLOEXEC | fcntl(r_io->FD, F_GETFD)); if ( r_io->Op == IORead ) { g_io_add_watch(r_io->GioCh, G_IO_IN | G_IO_ERR | G_IO_HUP, disclaimer: this bugfix has been tested briefly on debian gnu/linux 2.4.20 and solaris 8. please review my code for correctness. also note that bugreport 417 has been proven wrong by this. regards, raphael
On Sat, Mar 01, 2003 at 11:21:10PM +0100, Raphael Barabas wrote:
reason: in IO.c, function IO_submit, filedescriptor-flag close_on_exec is not set the right way (not at all). on solaris, as a direct result, non-blocking io will accidentally be handled via O_NDELAY instead of O_NONBLOCKING, resulting in an endless loop.
looks like i shot too fast. i forgot to grep the rest of the source for FD_CLOEXEC: IO/IO.c:533: O_NONBLOCK | FD_CLOEXEC | fcntl(r_io->FD, F_GETFL)); IO/http.c:267: O_NONBLOCK | FD_CLOEXEC | fcntl(S->SockFD, F_GETFL)); cookies.c:115: fcntl(fileno(F_in), F_SETFL, FD_CLOEXEC | fcntl(fileno(F_in), F_GETFL)); prefs.c:257: fcntl(fd, F_SETFL, FD_CLOEXEC | fcntl(fd, F_GETFL)); of course all of these need to be fixed. FD_CLOEXEC is set via F_SETFD, not F_SETFL. by now i also read the developer info on the webpage. i'll behave now, file a bugreport and mail a diff -pru to jcid@softhome.net ;) regards, raphael
participants (1)
-
Raphael Barabas