Blocking call to connect()

Matthias Hopf mshopf at
Wed Mar 19 03:03:07 PST 1997

>  > Any opinion on this ? I would also love a patch for non blocking DNS lookup,
> yourself to strict POSIX (perhaps to run even on non-DNS systems), and
> not count on getting non-blocking variants of the functions from POSIX
> threads, the best hack I can think of would be to spawn off a
> subprocess to do the lookups (and therefore, block on them); the main
> kaffe process could then communicate by non-blocking I/O to it.  (This

Well, spaning of a subprocess in an operating system independend manner is
nontrivial - e.g. on AmigaOS it is almost impossible to port programms using
fork() without greater code changes. That is one thing I loved about kaffe -
it doesn't use fork()... :-)

However, as long as the subprocess does not need its own address space
(I don't think a DNS lookup process needs its own address space..), that is
it does not use the same global and static variables as the main process,
preferably no global variables at all, creating a subprocess should be
managable in a portable way.

Just another two cents...


    //             |   Matthias Hopf - "Hoeppel"   |    _      __
\\ //    Amiga     |  student of computer science  |  _|cience |-iction
 \X/ by conviction |      in Erlangen/Germany      | by belief in Future

 EMail:  mshopf at
 Aminet: ftpamiga at

More information about the kaffe mailing list