[Toybox] Fwd: New toys : [prep/pkill and netstat]
Rob Landley
rob at landley.net
Mon Jul 15 11:51:15 PDT 2013
Ah, you did send a copy to the list and not just me. Forwarding reply...
Rob
On 07/15/2013 01:36:58 PM, Rob Landley wrote:
> On 07/12/2013 01:59:29 AM, Ashwini Sharma wrote:
>> Hi Rob,
>>
>> I have another Toy coming in klogd.
>> You already have my netstat, pgrep/pkill pending with you for your
>> review.
>> Can you please have a look at these + new toy, klogd.
>
> Sorry, last week at my current contract. Having to finish projects,
> pack up
> my apartment, close all the tabs on my workstation...
>
> This one I can add to pending now because it doesn't touch anything
> under
> lib. (I.E. it's self-contained and I can clean it up as I get to it.)
>
> This weekend I actually moved existing to-be-reviewed lib code into
> lib/pending.c, so I can add new functions to "pending" without losing
> track of what I haven't reviewed yet. (Trying to be less of a
> bottleneck.)
>
> However, last time I started reviewing the pgrep/pkill stuff, its
> lib.c
> change took signal numbers that were sorted in alphabetical order and
> gratuitously de-alphebetzied them for some reason?
>
> - SIGNIFY(ABRT), SIGNIFY(ALRM), SIGNIFY(BUS),
> - SIGNIFY(FPE), SIGNIFY(HUP), SIGNIFY(ILL), SIGNIFY(INT),
> SIGNIFY(KILL),
> - SIGNIFY(PIPE), SIGNIFY(QUIT), SIGNIFY(SEGV), SIGNIFY(TERM),
> - SIGNIFY(USR1), SIGNIFY(USR2), SIGNIFY(SYS), SIGNIFY(TRAP),
> - SIGNIFY(VTALRM), SIGNIFY(XCPU), SIGNIFY(XFSZ),
> -
> - // Start of non-terminal signals
> + SIGNIFY(HUP), SIGNIFY(INT), SIGNIFY(QUIT), SIGNIFY(ILL),
> + SIGNIFY(TRAP), SIGNIFY(ABRT), SIGNIFY(BUS), SIGNIFY(FPE),
> + SIGNIFY(KILL), SIGNIFY(USR1), SIGNIFY(SEGV), SIGNIFY(USR2),
> + SIGNIFY(PIPE), SIGNIFY(ALRM), SIGNIFY(TERM), SIGNIFY(STKFLT),
>
> (Why did it do that?) That's the point at which I went "ok, not
> trivial to
> apply, I need to study this" and it went on the todo list...
>
> Also, the previous signal list included all the ones specified by
> posix:
>
>
> http://lists.landley.net/pipermail/toybox-landley.net/2012-February/000175.html
>
> so adding more signals requires a bit more explanation (what are they
> needed for, how portable are they between libc implementations, etc).
>
> And the loop that set a signal handler for all terminating signals
> used
> SIGCHLD as the separator between terminal signals and non-terminal
> signals.
> (So it only assigned the signal handler to signals that would
> otherwise kill
> the program, not to ones that would be ignored or have some other
> default
> effect.) This patch removes the comment about that ("Start of
> non-terminal
> signals") and moves signals across that barrier (SIGSYS for example).
>
> The logic implementing this is the "sigatexit()" function right below
> the
> signal table. I was hoping that between the comment and the physical
> proximity of the function, it was sufficiently obvious...
>
>> Klogd has both the options as its source,
>> 1. Reading from kernel ring buffer, thru KLOGCTL interface
>> 2. Reading from "/proc/kmsg". This is Configurable option.
>
> Ok.
>
> Somebody on the busybox mailing list had a klogd issue recently, which
> wasn't getting fixed. (When it output to a pipe and the receiving
> program
> exited, SIGPIPE was ignored and the daemon went into a CPU-eating
> endless
> loop.) I'd actually bumped this up my todo list because of that. :)
>
>> Let me know for any comments you have.
>>
>> PS:- I have few more in pipeline, but doesn't want to overload your
>> pipeline/ mailbox.
>
> Sorry, I'm trying to catch up. If you could explain the above signal
> issue,
> that change to common code is what stopped me at least putting your
> previous
> submission into "pending".
>
> Rob
1373914275.0
More information about the Toybox
mailing list