소스 검색

* Don't close STDOUT if running in foreground

Bryan Drewery 16 년 전
부모
커밋
ab7d036a2b
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/main.c

+ 1 - 0
src/main.c

@@ -198,6 +198,7 @@ void fatal(const char *s, int recoverable)
 
   sdprintf(STR("Closing %d sockets"), dcc_total);
   for (int i = 0; i < dcc_total; i++) {
+    if (!backgrd && i == STDOUT) continue;
     if (dcc[i].type && dcc[i].sock >= 0) {
       sdprintf(STR("Closing %s dcc(%d)"), dcc[i].type->name, i);
       killsock(dcc[i].sock);