Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christoph Moench-Tegeder <cmt(at)burggraben(dot)net>
Cc: Anders Kaseorg <andersk(at)mit(dot)edu>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, alvherre(at)alvh(dot)no-ip(dot)org, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory
Date: 2022-01-09 23:16:43
Message-ID: 1899015.1641770203@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Christoph Moench-Tegeder <cmt(at)burggraben(dot)net> writes:
> ## Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us):
>> Isn't that a flat out violation of POSIX 8.3 Other Environment Variables?

> After poking around across some Linuxes, it looks like people silently
> agreed that "services" are not logged-in users: among the daemons,
> having HOME set (as observed in /proc/*/environ) is an exception,
> not the norm.

Meh. I guess there's not much point in arguing with facts on the
ground. Anders' proposed behavior seems like the way to go then,
at least so far as libpq is concerned. (I remain skeptical that
psql would be run in such an environment, but there's no value
in making it act different from libpq.)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-01-10 00:57:04 Re: Windows crash / abort handling
Previous Message Christoph Moench-Tegeder 2022-01-09 23:11:59 Re: [PATCH] Prefer getenv("HOME") to find the UNIX home directory