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

Commita560657

Browse files
committed
Move setup_cancel_handler() up near start of psql main(), where the
setup_win32_locks() call formerly was, to ensure that cancelConnLock isvalid when it needs to be. Per Yoshiyuki Asaba.
1 parent59fd249 commita560657

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/bin/psql/startup.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.133 2006/06/14 16:49:02 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/startup.c,v 1.134 2006/06/21 19:40:31 tgl Exp $
77
*/
88
#include"postgres_fe.h"
99

@@ -130,11 +130,14 @@ main(int argc, char *argv[])
130130
}
131131
}
132132

133-
pset.progname=get_progname(argv[0]);
134-
135133
#ifdefWIN32
136134
setvbuf(stderr,NULL,_IONBF,0);
137135
#endif
136+
137+
setup_cancel_handler();
138+
139+
pset.progname=get_progname(argv[0]);
140+
138141
setDecimalLocale();
139142
pset.cur_cmd_source=stdin;
140143
pset.cur_cmd_interactive= false;
@@ -370,9 +373,6 @@ main(int argc, char *argv[])
370373
if (options.action_string)/* -f - was used */
371374
pset.inputfile="<stdin>";
372375

373-
/* establish control-C handling for interactive operation */
374-
setup_cancel_handler();
375-
376376
successResult=MainLoop(stdin);
377377
}
378378

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp