On 14:25 Tue 23 Mar     , Yevgeny Kliteynik wrote:
> 
> I'm running "opensm > somefile", and I don't see SM's stdout
> (such as "SUBNET UP" message, or new cached options after SIGHUP),
> because when stdout is assigned to file and not terminal, it is
> handled differently. Instead of flushing on printing '\n',
> it becomes buffered, which means that you don't control when
> is this buffer flushed.
> My fix forces stdout to always flush stdout when printing '\n'.
> It has no effect when stdout is assigned to terminal, and it
> changes buffering when SM's stdout is redirected.
> 
> More details about stdout/stderr buffering:
> 
> http://www.pixelbeat.org/programming/stdio_buffering/

There you can find couple of ways to workaround this issue, for example:

  stdbuf -o L opensm > somefile

I would prefer to not change an external settings so the program would
work as expected.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to