Hey Sasha,

On Fri, 2008-09-05 at 02:28 +0300, Sasha Khapyorsky wrote:
> Hi Al,
> 
> On 11:21 Wed 03 Sep     , Al Chu wrote:
> > 
> > diff --git a/opensm/opensm/osm_console_io.c b/opensm/opensm/osm_console_io.c
> > index 2822737..3d3ece4 100644
> > --- a/opensm/opensm/osm_console_io.c
> > +++ b/opensm/opensm/osm_console_io.c
> > @@ -118,6 +118,10 @@ static void osm_console_close(osm_console_t * p_oct, 
> > osm_log_t * p_log)
> >                     p_oct->client_hn, p_oct->client_ip);
> >             cio_close(p_oct);
> >     }
> > +   if (p_oct->socket > 0) {
> > +           close(p_oct->socket);
> > +           p_oct->socket = -1;
> > +   }
> >  #endif
> >  }
> 
> Would this work good for stdin (when local console is in use)? 

As far as I can tell, p_oct->socket is only created when
OSM_REMOTE_CONSOLE or OSM_LOOPBACK_CONSOLE is set (in osm_console_init
()).

> I see that
> fd_in descriptor is closed in cio_close(), isn't it enough (I didn't
> look closely yet)?

>From osm_console() it seems the in_fd (set via cio_open()) is the socket
returned from accept() when a connection is accepted.  I couldn't find
where the original socket itself was actually being closed.

Al

> Sasha
-- 
Albert Chu
[EMAIL PROTECTED]
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory

_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to