FWIW, I failed to reproduce that on any of my machines. Maybe your editor is leaving the tty in a funny state?
Seems system() call cleanups sigaction state on FreeBSD. I've modify void setup_cancel_handler(void) { fprintf(stderr, "%p -> %p\n", pqsignal(SIGINT, handle_sigint), handle_sigint); } and add it around system() call. Next: % export EDITOR=echo % psql postgres 0x0 -> 0x409620 SET Timing is on. psql (9.2beta1) Type "help" for help. postgres=# \e 0x409620 -> 0x409620 /tmp/psql.edit.7997.sql 0x0 -> 0x409620 postgres=# -- Teodor Sigaev E-mail: teo...@sigaev.ru WWW: http://www.sigaev.ru/ -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers