[ofa-general] Re: [OPENSM] close console socket

Sasha Khapyorsky sashak at voltaire.com
Thu Sep 4 16:28:26 PDT 2008


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)? I see that
fd_in descriptor is closed in cio_close(), isn't it enough (I didn't
look closely yet)?

Sasha



More information about the general mailing list