Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 8cdd0422 authored by Rob Swindell's avatar Rob Swindell 💬

Restore console to "cooked" mode before daemonizing().

Previously, the console would be left in "raw" mode after invoking
'jsexec -d <module>'.
parent 74b4a948
Pipeline #640 passed with stage
in 10 minutes and 2 seconds
...@@ -1431,6 +1431,7 @@ int main(int argc, char **argv, char** env) ...@@ -1431,6 +1431,7 @@ int main(int argc, char **argv, char** env)
#if defined(__unix__) #if defined(__unix__)
if(daemonize) { if(daemonize) {
fprintf(statfp,"\nRunning as daemon\n"); fprintf(statfp,"\nRunning as daemon\n");
cooked_tty();
if(daemon(TRUE,FALSE)) { /* Daemonize, DON'T switch to / and DO close descriptors */ 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)); fprintf(statfp,"!ERROR %d (%s) running as daemon\n", errno, strerror(errno));
daemonize=FALSE; daemonize=FALSE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment