summaryrefslogtreecommitdiff
path: root/src/bin/psql/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/psql/command.c')
-rw-r--r--src/bin/psql/command.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bin/psql/command.c b/src/bin/psql/command.c
index 01ff7fb3957..351813feb8e 100644
--- a/src/bin/psql/command.c
+++ b/src/bin/psql/command.c
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.141 2005/03/11 17:20:34 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.142 2005/03/16 21:27:23 momjian Exp $
*/
#include "postgres_fe.h"
#include "command.h"
@@ -1574,11 +1574,13 @@ do_shell(const char *command)
shellName = DEFAULT_SHELL;
sys = pg_malloc(strlen(shellName) + 16);
+#ifndef WIN32
sprintf(sys,
/* See EDITOR handling comment for an explaination */
-#ifndef WIN32
"exec %s", shellName);
#else
+ sprintf(sys,
+ /* See EDITOR handling comment for an explaination */
"%s\"%s\"%s", SYSTEMQUOTE, shellName, SYSTEMQUOTE);
#endif
result = system(sys);