Subject: Re: [PATCH] tr2: log parent process name

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Mon, 10 May 2021 14:29:15 +0200

On Thu, May 06 2021, Emily Shaffer wrote:

> It can be useful to tell who invoked Git - was it invoked manually by a
> user via CLI or script? By an IDE? Knowing where the Git invocation came
> from can help with debugging to isolate where the problem came from.

Aside from the portability concerns others have raised, I don't really
see why you'd need this.

We already have the nest-level as part of the SID, so isn't it
sufficient (and portable) at the top-level to log what isatty says + set
the initial SID "root" in the IDE (which presumably knows about git).

Wouldn't this log passwords in cases of e.g.:

    some-script --git-password secret # invokes "git"

In older versions of linux reading e.g. smaps from /proc/self would
stall the kernel while the read was happening, I haven't checked whether
cmdline is such a thing (probably not), but it's a subtle thing to have
in mind for this / follow-ups if it's made portable (is that an issue on
other OS's?).

All that being said I've got nothing fundamentally against this.