Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa1a63d

Browse files
committed
Re-enable autoruns for for cmd.exe on Windows
This acts as a revert ofb83747a and9886744. As pointed outby Noah, HEAD and REL_17_STABLE are in a weird state where the codepaths adding /D would limit the spawn of child processes, but we stillhave code paths where the spawn of more than one child process would bepossible.Let's remove these /D switches for now, to bring back the code into astate consistent with how autorun is configured on a Windows host.Reported-by: Noah MischDiscussion:https://postgr.es/m/20240630021211.f3.nmisch@google.comBackpatch-through: 17
1 parent84a9d38 commitfa1a63d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎src/bin/pg_ctl/pg_ctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,11 +552,11 @@ start_postmaster(void)
552552
else
553553
close(fd);
554554

555-
cmd=psprintf("\"%s\" /D /C \"\"%s\" %s%s < \"%s\" >> \"%s\" 2>&1\"",
555+
cmd=psprintf("\"%s\" /C \"\"%s\" %s%s < \"%s\" >> \"%s\" 2>&1\"",
556556
comspec,exec_path,pgdata_opt,post_opts,DEVNULL,log_file);
557557
}
558558
else
559-
cmd=psprintf("\"%s\" /D /C \"\"%s\" %s%s < \"%s\" 2>&1\"",
559+
cmd=psprintf("\"%s\" /C \"\"%s\" %s%s < \"%s\" 2>&1\"",
560560
comspec,exec_path,pgdata_opt,post_opts,DEVNULL);
561561

562562
if (!CreateRestrictedProcess(cmd,&pi, false))

‎src/test/regress/pg_regress.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ spawn_process(const char *cmdline)
12441244
comspec="CMD";
12451245

12461246
memset(&pi,0,sizeof(pi));
1247-
cmdline2=psprintf("\"%s\" /d /c \"%s\"",comspec,cmdline);
1247+
cmdline2=psprintf("\"%s\" /c \"%s\"",comspec,cmdline);
12481248

12491249
if (!CreateRestrictedProcess(cmdline2,&pi))
12501250
exit(2);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp