Re: Network applications invoqued by inetd

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

 




José Ángel Berná Galiano wrote:

>     I'm developing an easy client-server application using inetd. I put
> my server program in inetd.conf and when it is invoqued by the client,
> the server always get the error "Address already in use". The sequence
> in the server code  for sockets is:
> 
>     socket() -> bind() -> listen() -> connect ()

The last one should be accept(), not connect().

> The function bind() always get error. Is there any consideration to
> program a server application when it is invoqued by inetd ?? I'm sure
> the code works when not using inetd.

Programs which are invoked by inetd shouldn't call any of the above
functions; inetd does all that. The program will be invoked with
the socket as stdin/stdout.

-- 
Glynn Clements <glynn.clements@virgin.net>
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux