This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ping Re: [PATCH] Make bindresvport() function to multithread-safe


On 09/18/2012 03:44 AM, Roland McGrath wrote:
> bindresvport has never been thread-safe before and AFAIK no other system
> that has the function makes it thread-safe.  Like all functions, if it's
> not specifically documented and being thread-safe, it isn't.  I don't see
> the rationale for requiring bindresvport to be thread-safe now.
> 

Although I do not find any rationale for requiring bindresvport to be 
thread-safe, bindresvport man-page says:
bindresvport() is used to bind a socket descriptor to a privileged
anonymous IP port, that is, a port number arbitrarily selected from the
range 512 to 1023.

That is, the valid value of port number is 512 to 1023,
but in multithread circumstance, the port number may be 1024.
The test program can refer to URL:
http://sourceware.org/bugzilla/show_bug.cgi?id=13763

So I think bindresvport() need to be fixed.

-- 
Best Regards,
Peng


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]