Re: git: 969f6380eb66 - main - kdump: nicer printing of kill(2) PID argument
- Reply: Konstantin Belousov : "Re: git: 969f6380eb66 - main - kdump: nicer printing of kill(2) PID argument"
- Reply: John Baldwin : "Re: git: 969f6380eb66 - main - kdump: nicer printing of kill(2) PID argument"
- In reply to: Gleb Smirnoff : "Re: git: 969f6380eb66 - main - kdump: nicer printing of kill(2) PID argument"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Jun 2025 23:03:44 UTC
On 6/4/25 17:55, Gleb Smirnoff wrote: > On Wed, Jun 04, 2025 at 01:51:14AM +0000, Kyle Evans wrote: > K> The branch main has been updated by kevans: > K> > K> URL: https://cgit.FreeBSD.org/src/commit/?id=969f6380eb66f809eed3e5c38b6021824a4cc2bf > K> > K> commit 969f6380eb66f809eed3e5c38b6021824a4cc2bf > K> Author: Kyle Evans <kevans@FreeBSD.org> > K> AuthorDate: 2025-06-04 01:51:06 +0000 > K> Commit: Kyle Evans <kevans@FreeBSD.org> > K> CommitDate: 2025-06-04 01:51:06 +0000 > K> > K> kdump: nicer printing of kill(2) PID argument > K> > K> Similar to wait*(), kill(2) operates on a pid that currently gets output > K> as hex. Output it in decimal to make it a little easier to eyeball the > K> pid we're signalling. > K> > K> Reviewed by: markj > K> Differential Revision: https://reviews.freebsd.org/D50508 > > I didn't review if PIDs are always printed as decimals or not, but for > the file descriptors it is a mix of hex and decimals. :( Usually I go > with a sed script over kdump output to make it consistent. > To be fair, I'd like to fix that, too- I noticed close() the other day for fd > 0, but paused when I: 1.) couldn't tell where we even output close args 2.) noticed that close_range has the same problem, but hex can make sense for its upper range (particularly when you're doing ~0U to simulate closefrom(2)) and that's a bit of a predicament because that's a harder pattern to spot in decimal. > I think if we try to bring that to common format, that would leave > some people unsatisfied regardless of our choice - all decimal or > all hex. > > So, I would suggest to add a command line options that would force > into all hex or all decimal. > I'd like to hear from some folks that prefer hex here... other system tools are generally not printing IDs in hex, so it makes it harder to correlate. Ideally, I think we'd audit it all and make sure we match truss(1) here (which tends to just print decimal for all of the ID arguments, as far as I've found).