Loading lib/communication.c +6 −1 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ static int send_request(norns_rpc_type_t type, norns_response_t* resp, ...) { int res; int conn; int conn = -1; bool control_request = false; msgbuffer_t req_buf = MSGBUFFER_INIT(); msgbuffer_t resp_buf = MSGBUFFER_INIT(); Loading Loading @@ -321,6 +321,11 @@ send_request(norns_rpc_type_t type, norns_response_t* resp, ...) { cleanup_on_error: va_end(ap); if(conn != -1) { close(conn); } return res; } Loading lib/log.c +4 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,10 @@ log_error_helper(const char* file, int line, const char* func, fprintf(outfp, "%s", buffer); end: if(outfp != stderr) { fclose(outfp); } errno = saved_errno; } Loading src/urd.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -84,8 +84,7 @@ pid_t urd::daemonize() { /* Fork off the parent process */ if((pid = fork()) < 0) { LOGGER_ERROR("[daemonize] fork failed."); perror("Fork"); LOGGER_ERROR("Failed to create child process: {}", strerror(errno)); exit(EXIT_FAILURE); } Loading Loading @@ -170,6 +169,7 @@ pid_t urd::daemonize() { } close(lfp); close(fd); /* Manage signals */ signal(SIGCHLD, SIG_IGN); /* ignore child */ Loading Loading
lib/communication.c +6 −1 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ static int send_request(norns_rpc_type_t type, norns_response_t* resp, ...) { int res; int conn; int conn = -1; bool control_request = false; msgbuffer_t req_buf = MSGBUFFER_INIT(); msgbuffer_t resp_buf = MSGBUFFER_INIT(); Loading Loading @@ -321,6 +321,11 @@ send_request(norns_rpc_type_t type, norns_response_t* resp, ...) { cleanup_on_error: va_end(ap); if(conn != -1) { close(conn); } return res; } Loading
lib/log.c +4 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,10 @@ log_error_helper(const char* file, int line, const char* func, fprintf(outfp, "%s", buffer); end: if(outfp != stderr) { fclose(outfp); } errno = saved_errno; } Loading
src/urd.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -84,8 +84,7 @@ pid_t urd::daemonize() { /* Fork off the parent process */ if((pid = fork()) < 0) { LOGGER_ERROR("[daemonize] fork failed."); perror("Fork"); LOGGER_ERROR("Failed to create child process: {}", strerror(errno)); exit(EXIT_FAILURE); } Loading Loading @@ -170,6 +169,7 @@ pid_t urd::daemonize() { } close(lfp); close(fd); /* Manage signals */ signal(SIGCHLD, SIG_IGN); /* ignore child */ Loading