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

Commit9b8a93b

Browse files
committed
Use windows DACL fix for pg_regress as well.
Dave Page
1 parent2c63d84 commit9b8a93b

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
14-
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.42 2008/02/20 22:44:16 tgl Exp $
14+
* $PostgreSQL: pgsql/src/test/regress/pg_regress.c,v 1.43 2008/03/04 15:38:31 mha Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -1009,14 +1009,30 @@ spawn_process(const char *cmdline)
10091009
cmdline2=malloc(strlen(cmdline)+8);
10101010
sprintf(cmdline2,"cmd /c %s",cmdline);
10111011

1012-
if (!CreateProcessAsUser(restrictedToken,NULL,cmdline2,NULL,NULL, FALSE,0,NULL,NULL,&si,&pi))
1012+
if (!CreateProcessAsUser(restrictedToken,
1013+
NULL,
1014+
cmdline2,
1015+
NULL,
1016+
NULL,
1017+
TRUE,
1018+
CREATE_SUSPENDED,
1019+
NULL,
1020+
NULL,
1021+
&si,
1022+
&pi))
10131023
{
10141024
fprintf(stderr,_("could not start process for \"%s\": %lu\n"),
10151025
cmdline2,GetLastError());
10161026
exit_nicely(2);
10171027
}
1028+
1029+
#ifndef__CYGWIN__
1030+
AddUserToDacl(pi.hProcess);
1031+
#endif
1032+
10181033
free(cmdline2);
10191034

1035+
ResumeThread(pi.hThread);
10201036
CloseHandle(pi.hThread);
10211037
returnpi.hProcess;
10221038
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp