[ofa-general] Re: [PATCH] opensm/console: Fixed osm_console poll to handle POLLHUP
Sasha Khapyorsky
sashak at voltaire.com
Fri Mar 6 03:33:50 PST 2009
On 10:17 Fri 06 Mar , Nicolas Morey Chaisemartin wrote:
> When opensm is called after a pipe to execute a command in the local console,
> it uses 100% CPU as osm_console poll returns (POLLIN) as if there was something to read from stdin where there isn't.
>
> This patch fixes the problem by closing the local console when POLLHUP is received.
> osm_console will return an error code which will unset the console_init_flag so it won't be reopened.
> For socket console, cio_close is called to close the current connection but keep the socket open.
>
> Signed-off-by: Nicolas Morey-Chaisemartin <nicolas.morey-chaisemartin at ext.bull.net>
Applied. Thanks.
Sasha
More information about the general
mailing list