[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-time] GNU time
From: |
Assaf Gordon |
Subject: |
Re: [Bug-time] GNU time |
Date: |
Sun, 27 Oct 2019 23:44:51 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 |
(please use reply-all to keep address@hidden in the loop)
Hello,
On 2019-10-24 12:36 p.m., Сергей Кузнецов wrote:
чт, 17 окт. 2019 г. в 08:11, Assaf Gordon <address@hidden
<mailto:address@hidden>>:
[...]
Maybe also add %Td specifier, which will print signal's description or
something like it?
e.g.:
$ ./time -q \
-f "exit type: %Tt\nexit code: %Tx\nsig-spec:
%Ts\nsig-num:%Tn\n" \
./tests/time-aux -S TERM -e 4
exit type: signalled
exit code:
sig-spec: TERM
sig-num: 15
sig-desc: Terminated
On 2019-10-24 12:40 p.m., Сергей Кузнецов wrote:
...I implemented it. > Need I to send you 'git diff' or what should I do?
The code has now been added to the master branch,
and will be included in the next release:
https://git.savannah.gnu.org/cgit/time.git
As for adding a signal description:
How would that differ from the signal name (%Ts) ?
e.g., why is "Terminated" much better than "TERM"?
Also, it will need to be portable to non-linux operating systems,
so something similar to gnulib's "sig2str" module:
https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/sig2str.c
The current (new) code does work on all BSDs, OpenSolaris and AIX and
not just linux.
If you do choose to make the patch portable and offer it for inclusion,
you'll need to agree to assign the copyright of the code to the FSF.
This is explained here:
https://www.gnu.org/licenses/why-assign.en.html
To do that, please fill and send the following form:
https://git.savannah.gnu.org/cgit/gnulib.git/tree/doc/Copyright/request-assign.future
regards,
- asssaf