View mode: basic / threaded / horizontal-split · Log in · Help
September 20, 2008
Re: inetd or super-server in D :-)
On Fri, 19 Sep 2008 19:16:41 +0100, Chris R. Miller  
<lordsauronthegreat@gmail.com> wrote:

> Robert wrote:
>> I code super-server in D(simple implementation of something like  
>> "inetd" does). To select attempt of connection I use modules of class  
>> Selector. My problems:
>> - how super-server can realize the port of connection request of the  
>> client, to provide proper request-handle procedure?
>> -after "fork" do I just trigger "exec" with proper server as an  
>> argument of the function   ?
>> -should I trigger everything via TCPD? (because simple version with  
>> exec(serverd,....) doesn't work properly on my ubuntu)?
>> - to close all file descriptors I have problem with usage of NOFILE  
>> const or RLIMIT_NOFILE?
>> how this thing should look in D?
>> Thanks for any tips.
>
> http://www.enderunix.org/docs/eng/daemon.php
>
> This is the definitive guide for server programming on UNIX platforms.  
> Note that most of these functions are hiding in unistd.h.  You can get  
> them by importing the D bindings to the C standard library.

Ah 2001 before spelling hit the internet. Its nice to have standarts.

That's a handy link.
Its also work looking at Stevens - "Advanced Programming in the Unix  
Environment":

http://www.amazon.com/Programming-Environment-Addison-Wesley-Professional-Computing/dp/0201563177

And the art of unix programming is woth a read too:

http://www.faqs.org/docs/artu/
Next ›   Last »
1 2
Top | Discussion index | About this forum | D home