parallel
[Top][All Lists]
Advanced

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

Re: Which exit code should --halt give?


From: Ole Tange
Subject: Re: Which exit code should --halt give?
Date: Sat, 2 May 2015 12:37:23 +0200

On Sat, May 2, 2015 at 12:26 PM, Ole Tange <ole@tange.dk> wrote:

> --halt soon,success=1 == --halt -1

It will be useful to distinguish between halting because a job
succeeded (e.g. a solution was found) or because there are no more
jobs (e.g. no solution was found). So I think these should give
different exit codes:

  parallel --halt soon,success=1 exit ::: 0 1; echo $?
  parallel --halt soon,success=1 exit ::: 1 1; echo $?

But I am less sure what the exit code should represent if there are no
successes. It could be the number of failing jobs or the exit code of
the first/last failing job if any. And what should then be the exit
code if no jobs were run? (e.g. parallel -r exit ::: '')

> --halt now,success=1 == --halt -2

The same argument as above.


/Ole



reply via email to

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