Description: Fix ECHILD error
 Fix the ECHILD error that was present under kFreeBSD
Author: Petr Salinger <Petr.Salinger@seznam.cz>
Origin: other
---
Index: vpcs/src/hv.c
===================================================================
--- vpcs.orig/src/hv.c	2013-10-08 11:18:05.625004770 +0100
+++ vpcs/src/hv.c	2013-10-08 11:19:39.219828123 +0100
@@ -156,15 +156,16 @@
 		goto ret;
 	}
 #endif	
-	signal(SIGCHLD, SIG_IGN);
-	signal(SIGPIPE, SIG_IGN);
-
 	memset(vpcs_list, 0, MAX_DAEMONS * sizeof(struct list));
 	
 	if (openpty(&ptyfdm, &ptyfds, NULL, NULL, NULL)) {
 		perror("Create pseudo-terminal");
 		goto ret;
 	}
+
+	signal(SIGCHLD, SIG_IGN);
+	signal(SIGPIPE, SIG_IGN);
+
 	fptys = fdopen(ptyfds, "w");
 	
 	rls = readline_init(50, 128);
