浏览代码

bug fix (hopefuly not bug introduction)
initiatilization of main process's process_no etc moved
behind open_fifo_server to make sure that the fifo server
does not get main's values

Jiri Kuthan 23 年之前
父节点
当前提交
72b7f9a2fe
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      main.c

+ 4 - 4
main.c

@@ -494,16 +494,16 @@ int main_loop()
 						pids[process_no]=pid; /*should be shared mem anway*/
 				}
 		}
-		/* main process, receive loop */
-		pids[0]=getpid();
-		process_bit = 1;
-		process_no=0; /*main process number*/
 
 		/* if configured to do so, start a server for accepting FIFO commands */
 		if (open_fifo_server()<0) {
 			LOG(L_ERR, "opening fifo server failed\n");
 			goto error;
 		}
+		/* main process, receive loop */
+		pids[0]=getpid();
+		process_bit = 1;
+		process_no=0; /*main process number*/
 		
 		     /* We will call child_init even if we
 		      * do not fork