From 121bd6294d3c2eea4d052499b31be2484bdc7d1c Mon Sep 17 00:00:00 2001 From: Michael Hampton Date: Fri, 13 Feb 2004 20:51:13 +0000 Subject: [PATCH] * Reset screen attributes before fork() so that external programs do the right thing --- citadel/ChangeLog | 5 +++++ citadel/messages.c | 4 ++-- citadel/routines2.c | 5 +++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index ed5849f16..becb79fb3 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,8 @@ $Log$ + Revision 614.28 2004/02/13 20:51:13 error + * Reset screen attributes before fork() so that external programs do the + right thing + Revision 614.27 2004/02/12 04:16:38 ajc * Support for PLAIN logins in IMAP (need to test!) @@ -5316,3 +5320,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/messages.c b/citadel/messages.c index f55946e7d..54d8557eb 100644 --- a/citadel/messages.c +++ b/citadel/messages.c @@ -913,10 +913,10 @@ ME1: switch (mode) { case 2: default: /* allow 2+ modes */ e_ex_code = 1; /* start with a failed exit code */ - editor_pid = fork(); - cksum = file_checksum(filename); screen_reset(); sttybbs(SB_RESTORE); + editor_pid = fork(); + cksum = file_checksum(filename); if (editor_pid == 0) { char tmp[SIZ]; diff --git a/citadel/routines2.c b/citadel/routines2.c index 3b264211f..6b366f098 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -510,10 +510,11 @@ void validate(CtdlIPC *ipc) void subshell(void) { int a, b; + + screen_reset(); + sttybbs(SB_RESTORE); a = fork(); if (a == 0) { - screen_reset(); - sttybbs(SB_RESTORE); signal(SIGINT, SIG_DFL); signal(SIGQUIT, SIG_DFL); execlp(getenv("SHELL"), getenv("SHELL"), NULL); -- 2.39.2