On Windows, use COMSPEC to find the location of cmd.exe.
Tom Lane <tgl@sss.pgh.pa.us>
On Windows, use COMSPEC to find the location of cmd.exe. Historically, psql consulted COMSPEC to spawn a shell in its \! command, but we just invoked "cmd" when spawning shells in pg_ctl and pg_regress. It seems better to rely on the environment variable, if it's set, in all cases. It's debatable whether this is a bug fix or just a behavioral change, so no back-patch. Juan José Santamaría Flecha Discussion: https://postgr.es/m/16080-5d7f03222469f717@postgresql.org
Files
| Path | Change | +/− |
|---|---|---|
| src/bin/pg_ctl/pg_ctl.c | modified | +10 −4 |
| src/test/regress/pg_regress.c | modified | +7 −1 |
Discussion
- BUG #16080: pg_ctl is failed if a fake cmd.exe exist in the current directory. 10 messages · 2019-10-26 → 2019-10-28