Re: [PATCH] hwclock: flush stdout in hwclock -c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 27 Apr 2015 17:27:07 -0400
J William Piggott <elseifthen@xxxxxxx> wrote:

> I do not understand what this patch accomplishes. stdout is line
> buffered. All of hwclock -c output ends with \n, which flushes
> the buffer. Then we flush it again with fflush? What am I missing?

stdout is line buffered only if it is not redirected. Using the pipe
symbol in shell to redirect the output i.e. to awk results in not
flushing the buffer until it's full.

A quick test:
$ hwclock -c | cat


Regards,
Alexey
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux