Re: too many close calls for non-opened fds

This is a discussion on Re: too many close calls for non-opened fds within the OpenSSH Development forums, part of the Networking and Network Related category; On August 22, 2006 10:53:51 AM -0700 Rick Jones <rick.jones2@hp.com> wrote: > Chris ...


Go Back   Usenet Forums > Networking and Network Related > OpenSSH Development

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-22-2006
Frank Cusack
 
Posts: n/a
Default Re: too many close calls for non-opened fds

On August 22, 2006 10:53:51 AM -0700 Rick Jones <rick.jones2@hp.com> wrote:
> Chris Rapier wrote:
>>
>> Rick Jones wrote:
>>
>>>> Actually that was a mistake on my part. When -r option is used the close
>>>> call occurs only during startup and not for every connection. During startup
>>>> with -r option we get around 60K close calls.
>>>> We are about to do a fix for this issue on HP-UX (without -r option). The
>>>> approach is to find out the open fds and close the unwanted ones. Will this
>>>> be a valid approach.
>>>
>>> I would think that the overhead of determining if an FD is open wouldn't
>>> be that far off from closing it.

>>
>>
>> One question: I'm assuming its cheaper (or at least was at one time) to
>> just close a whole bunch of FDs rather than track what FDs are being
>> opened as they are being opened?

>
> most likely - at least when we are talking about crossing an exec boundary.


You can probably peek in /proc or /sys or otherwise get a list with one
syscall. But you don't have to track anything. You simply set FD_CLOEXEC.

Just to be clear (although I think everyone gets it) this problem isn't fd's
that sshd opens, it's fd's that might already be open when sshd is started.
At least that's my understanding.

Then again, if that's the case I don't understand the problem. sshd should
close all fd's when it starts up and that's that.

I'll crawl back into my hole now.

-frank
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://lists.mindrot.org/mailman/lis...enssh-unix-dev
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:54 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0