浏览代码

snmpstats: return from agentx spawning

Daniel-Constantin Mierla 14 年之前
父节点
当前提交
97a616f1e3
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      modules_k/snmpstats/snmpstats.c

+ 2 - 0
modules_k/snmpstats/snmpstats.c

@@ -285,12 +285,14 @@ static int mod_child_init(int rank)
 		return 0;
 		return 0;
 	}
 	}
 
 
+	/* Spawn SNMP AgentX process */
 	pid=fork_process(PROC_NOCHLDINIT, "SNMP AgentX", 1);
 	pid=fork_process(PROC_NOCHLDINIT, "SNMP AgentX", 1);
 	if (pid<0)
 	if (pid<0)
 		return -1; /* error */
 		return -1; /* error */
 	if(pid==0){
 	if(pid==0){
 		/* child */
 		/* child */
 		agentx_child(1);
 		agentx_child(1);
+		return 0;
 	}
 	}
 
 
 	/* Spawn a child that will check the system up time. */
 	/* Spawn a child that will check the system up time. */