[prev in list] [next in list] [prev in thread] [next in thread] 

List:       proftpd-users
Subject:    Re: [Proftpd-user] listen() failed ...
From:       Matus UHLAR - fantomas <uhlar () fantomas ! sk>
Date:       2004-05-27 15:21:34
Message-ID: 20040527152134.GA7978 () fantomas ! sk
[Download RAW message or body]

On 27.05 22:06, Naho Murakuni wrote:
> I understand that listen() cannot run on the same address/port.
> 
> Do you take following specification into consideration? :
> On linux, two processes can bind using the same address/port.

I don't see a reason

> In ProFTPD, it seems that processing when bind() fails by EADDRINUSE is
> performed, but on linux, bind() does not fail by EADDRINUSE.

did you run lsof on both processesto see how is that possible?

> It is another discussion whether it is bad or good that you finish a
> session with listen() failing by this timing.
> However, would you understand that this phenomenon often happens on linux?

basically I don't believe this happens and I think you were mistaken...

> > > > Therefore, when listen() failed, isn't it better to be make to retry?
> > 
> > I don't think so. there is a high probability then calling listen() again
> > will fail too. If we'd think this way, we'd have to repeat every failed
> > operation...
> 
> If listen() fails and errno is EADDRINUSE, how about closing a socket,
> remaking a socket once again, running bind() using other port, and
> running listen()?

if we specified an IP address/port to bind to, and bind()/listen() fails,
I don't see why to try another IP/port.
If we did not specify it, kernel will shoose (semi)random port, so no
problems should appear

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Linux - It's now safe to turn on your computer.
Linux - Teraz mozete pocitac bez obav zapnut.


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
ProFTPD Users List   <proftpd-users@proftpd.org>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic