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

Commitf44c64c

Browse files
committed
Quote SHELL arguments only on Win32.
1 parentff5b6c9 commitf44c64c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

‎src/bin/psql/command.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2004, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.135 2004/11/15 23:15:12 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.136 2004/11/30 19:01:28 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"command.h"
@@ -1563,10 +1563,12 @@ do_shell(const char *command)
15631563

15641564
sys=pg_malloc(strlen(shellName)+16);
15651565
sprintf(sys,
1566+
/* See EDITOR handling comment for an explaination */
15661567
#ifndefWIN32
1567-
"exec"
1568-
#endif
1568+
"exec%s",shellName);
1569+
#else
15691570
"%s\"%s\"%s",SYSTEMQUOTE,shellName,SYSTEMQUOTE);
1571+
#endif
15701572
result=system(sys);
15711573
free(sys);
15721574
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp