From 75b871a7ed5ebf538cd97fb213582e9730c03d94 Mon Sep 17 00:00:00 2001 From: Rob Swindell <rob@synchro.net> Date: Fri, 13 Nov 2020 21:40:01 -0800 Subject: [PATCH] Restore console to "cooked" mode before daemonizing(). Previously, the console would be left in "raw" mode after invoking 'jsexec -d <module>'. --- src/sbbs3/jsexec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sbbs3/jsexec.c b/src/sbbs3/jsexec.c index 85a57f3eee..a191ab5943 100644 --- a/src/sbbs3/jsexec.c +++ b/src/sbbs3/jsexec.c @@ -1431,6 +1431,7 @@ int main(int argc, char **argv, char** env) #if defined(__unix__) if(daemonize) { fprintf(statfp,"\nRunning as daemon\n"); + cooked_tty(); if(daemon(TRUE,FALSE)) { /* Daemonize, DON'T switch to / and DO close descriptors */ fprintf(statfp,"!ERROR %d (%s) running as daemon\n", errno, strerror(errno)); daemonize=FALSE; -- GitLab