ocserv 0.11.1 can not fork into background on FreeBSD

Nikos Mavrogiannopoulos n.mavrogiannopoulos at gmail.com
Fri Apr 15 02:44:04 PDT 2016


On Thu, Apr 14, 2016 at 9:56 PM, Carlos J Puga Medina <cpm at fbsd.es> wrote:
>> > (libev) kevent
>> > Is someone working to fix this issue?
>> Not that I know of. Someone should debug that on freebsd preferrably
>> using ocserv's master branch. As it is on startup it looks something
>> easy to address once someone takes a look on the invalid descriptor
>> and its history.
> The problem started when ocserv was converted to use libev.
> https://gitlab.com/ocserv/ocserv/commit/0e604b8a9f3eb2421779fe8fa131470
> 8b4011b78

Thank you. That could be related with libev's default backend in
freebsd. Could you try with a simple poll as backend?

regards,
Nikos
-------------- next part --------------
diff --git a/src/main.c b/src/main.c
index dfbaed3..31847a1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1172,7 +1172,7 @@ int main(int argc, char** argv)
 
 	memset(&creds, 0, sizeof(creds));
 
-	loop = EV_DEFAULT;
+	loop = ev_default_loop (EVBACKEND_POLL);
 	if (loop == NULL) {
 		fprintf(stderr, "could not initialise libev\n");
 		exit(1);


More information about the openconnect-devel mailing list