Re: Review request: revised bindresvport() man page

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

 



Hi Petr

Thanks for reviewing this!

[...]
>> .BR 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.
>
> the range of?

No -- this is okay English.

>> .\" Glibc actually starts searching with a port # the range 600 to 1023
>
> I think this is confusing, since it will still try 512..600 if nothing
> above is available. "Glibc will start searching from number 600 above
> and try lower port numbers only if no higher port is free." perhaps?
> Though that feels like quite an implementation detail, I would
> personally expect this in the NOTES section.

Note that line is source code comment.  It won't appear in the
formatted output.  As you say, it's an implementation detail, and I
didn't think it worth including it in the formatted text.

[...]

>> .SH RETURN VALUE
>> .BR bindresvport ()
>> returns 0 on success; otherwise \-1 is returned and
>> .I errno
>> set to indicate the cause of the error.
>
> Maybe it would be better to maintain consistent wording with other
> manpages, e.g. bind(2)?
>
> "On success, zero is returned.  On error, -1 is returned, and errno is
> set appropriately."

Yes, this is one of those nagging issues that needs to be fixed up,
probably in hundreds of pages.  One day...

[...]

>> .SH NOTES
>> .LP
>> Only root can bind to a privileged port; this call will fail for any
>> other users.
>> .I sin
>> is not NULL and
>> .I sin\->sin_family
>> is not
>> .BR AF_INET .
>
> Leftover from older version?

Yes.  Thanks for catching that.  I removed that text now.

[...]

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git
man-pages online: http://www.kernel.org/doc/man-pages/online_pages.html
Found a bug? http://www.kernel.org/doc/man-pages/reporting_bugs.html
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux