Re: BUG #16080: pg_ctl is failed if a fake cmd.exe exist in the current directory. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #16080: pg_ctl is failed if a fake cmd.exe exist in the current directory.
Date
Msg-id 26128.1572103204@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #16080: pg_ctl is failed if a fake cmd.exe exist in thecurrent directory.  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Responses Re: BUG #16080: pg_ctl is failed if a fake cmd.exe exist in thecurrent directory.
List pgsql-bugs
=?UTF-8?Q?Juan_Jos=C3=A9_Santamar=C3=ADa_Flecha?= <juanjo.santamaria@gmail.com> writes:
> There is a difference in the behaviour for the WIN32 port. In other
> platforms execl() is called from "src/bin/pg_ctl/pc_ctl" with the full path
> ("/bin/sh"), but for WIN32 the function CreateProcessAsUser() calls the CMD
> command without a path, and this function has a search logic of its own [1].

Right, but does cmd.exe have a well-defined location in Windows?
I don't think we can know which drive it's on, for starters.

Ultimately this seems like a problem of insecure search path,
which is not our responsibility to fix (and people would not
appreciate us trying, in many cases).

            regards, tom lane



pgsql-bugs by date:

Previous
From: Juan José Santamaría Flecha
Date:
Subject: Re: BUG #16080: pg_ctl is failed if a fake cmd.exe exist in thecurrent directory.
Next
From: Juan José Santamaría Flecha
Date:
Subject: Re: BUG #16080: pg_ctl is failed if a fake cmd.exe exist in thecurrent directory.