bug-coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] md5: accepts a new --threads option


From: Ralf Wildenhues
Subject: Re: [PATCH] md5: accepts a new --threads option
Date: Fri, 23 Oct 2009 08:29:35 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Pádraig Brady writes:
>   find /disk1 | xargs md5sum & find /disk2 | xargs md5sum
> 
> Note if we're piping/redirecting the output of the above
> then we must be careful to line buffer the output from md5sum
> so that it's not interspersed.

That doesn't sound right, nor sufficient.

If you pipe the output, you shouldn't have a problem in any case,
as long as output is done in chunks less than PIPE_BUF.
If you redirect the output, you need to use append mode: >> file
rather than > file.  Otherwise, you still have a race, it's just
less likely to be won.

Of course, line buffering by default still seems like a good idea.

Cheers,
Ralf





reply via email to

[Prev in Thread] Current Thread [Next in Thread]