bug-findutils
[Top][All Lists]
Advanced

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

[bug #61664] Messy output using xargs -P


From: Bernhard Voelker
Subject: [bug #61664] Messy output using xargs -P
Date: Mon, 13 Dec 2021 18:27:06 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

Update of bug #61664 (project findutils):

                  Status:                    None => Invalid                
             Assigned to:                    None => berny                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

There's nothing xargs could do about it - it doesn't even know
that the launched processes write to stdout at the same time.

The man page puts this quite clearly:


Please  note  that it is up to the called processes to properly manage
parallel access to shared resources.  For example, if more than one of them
tries to print to stdout, the output will be produced in an indeterminate
order (and very likely mixed
up) unless the processes collaborate in some way to prevent this.  Using some
kind of locking scheme is one way to prevent such problems.  In general, using
a locking scheme will help ensure correct output but reduce performance.  If
you don't  want
to tolerate the performance difference, simply arrange for each process to
produce a separate output file (or otherwise use separate resources).


It's simply a race: no one can guarantee which process will write next into
the same file descriptor, stdout.

As this is nothing xargs(1) can do about it, I'm hereby marking this as
'invalid'.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61664>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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