bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Library proposal?


From: Alain Magloire
Subject: Re: Library proposal?
Date: Tue, 30 Oct 2001 10:55:43 -0500 (EST)

> 
> I'm wondering how hard something like this would be to do?
> 
> Write a library function called "server_start".  Depending on
> parameters passed to it, it could either:
> 
> Just run, assuming that STDIN/STDOUT were attached correctly.
> Run in daemon mode, and fork for every new connection.

So far nothing special, we even have a special function to handle
becoming a daemon, libinetutils/daemon.c

Pretty much all the server in GNU inetutils will be able to be
started standalone when need be.

> Prefork a certain number of connections, and hand control off.
> (riskier, but suitable for gopher, whois, http) spawn a new thread or 
> pre/spawn threads.
> 

IIRC, prefork uses two different technics:
- everybody blocks on accept() and the kernel will schedule
  want to go(the thundering hurd effect :)  This requires
  that accept() be a kernel call and made thread-safe.
- Some ioctl() message passing to be able to recuparate an fd
  from an unrelated process.

But I can be wrong.

> The idea is that (file descriptors?  library routines?) would be
> provided for input and output to make that transparent.

You as something in mind?
The only server that would need that kind of artillery is httpd ..
and we do not have one.  I'm thinking of talking to the guys
of boa to get a small httpd in inetutils.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]