Hi,

ClamAV has changed to call fork() after creating its local socket.
This causes weird behaviours when communicating on the socket [1]

If fork() is called before creating the socket() it works.

Is it safe to create a socket, fork(), and then call pthread_create()
and read from the socket?
It seems not to work, the thread gets stuck in pthread_mutex_lock(), and
it  is not woken up even after the mutex is free. Moving fork() before
the socket avoids this.
Is this intended behaviour or a bug?

I found that calling non-async-signal-safe functions after fork() can
cause problems on FreeBSD [2], is the situation the same on OpenBSD?

I am using OpenBSD 4.2 GENERIC#375 i386.

Thanks,
--Edwin

[1] https://wwws.clamav.net/bugzilla/show_bug.cgi?id=885
[2]
http://lists.freebsd.org/pipermail/freebsd-hackers/2005-August/013310.html

Reply via email to