bug-time
[Top][All Lists]
Advanced

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

Re: [Bug-time] md5sum and recursive traversal of dirs


From: Assaf Gordon
Subject: Re: [Bug-time] md5sum and recursive traversal of dirs
Date: Sat, 12 Oct 2019 14:26:16 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

( adding bug-time@ )

Hello,

On 2019-10-10 11:29 a.m., Сергей Кузнецов wrote:
[...]
By the way, I wrote two new small programs: xchg (or swap, which name is
better?) And exst (exit status).
[...] The second program launches the
program indicated at startup and, after its completion, prints the output
status or the caught signal.

Somewhat related:

the GNU Time program can report both exit code and signal
in the following way:

  $ env time -f "Exit code: %x\n" [SOME PROGRAM that dies with segfault]
  Command terminated by signal 11
  Exit code: 0

However, for a long time I wanted to add a new output format
specifier to GNU time that will indicate whether
a program existed cleaning or with a signal
(and which exit code or signal).

Your message reminded me of that, and I hope to add something
like that in the near future.

It could be something like:

   %T   1 if program terminated by a signal, empty otherwise
   %S   signal number of program terminal by a signal, empty otherwise
   %X   exit code if program terminated normal,
        or empty if terminated by a singal

And could be used like so:

  time -f "Signaled: %T (signal number: %S)\nExit code: %X\n" [PROGRAM]


Please send comments and suggestions to address@hidden .

regards,
 - assaf

P.S.
Note that your built-in shell like has its own 'time' function.
To use GNU time run "env time" or "\time" .



reply via email to

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