Thread (222 messages) 222 messages, 11 authors, 2020-04-06

Re: [PATCH v5 08/15] bugreport: include user interactive shell

From: Emily Shaffer <hidden>
Date: 2020-02-04 23:16:09

On Thu, Jan 30, 2020 at 11:28:40PM +0100, Martin Ågren wrote:
On Fri, 24 Jan 2020 at 04:41, [off-list ref] wrote:
quoted
+       char *shell = NULL;
(Unnecessary initialization.)
quoted
+       shell = getenv("SHELL");
+       strbuf_addf(sys_info, "$SHELL (typically, interactive shell): %s\n",
+                   shell ? shell : "(NULL)");
Thanks for avoiding a classic pitfall. :-)
Thank Junio. I fell right into it because it Just Works in gcc. ;)
"<unused>" instead of "(NULL)"? "NULL" is mostly an implementation
detail.
Sure, why not.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help