Hang with Solaris' event ports and pipes
2009-02-04 15:48:47 GMT
Hi,
I experience strange behaviour with libevent on Solaris in combination with pipes.
Start the following program and then kill its child. The parent goes in an endless loop instead of exiting.
When using socketpair() instead of pipe() everything works as expected.
Setting EVENT_NOEVPORT=y also makes it work.
Im using libevent-1.4.9-stable on Solaris 5.10
Jörg
/////////////////////////////////////////////////////
#include <event.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
static void eventCallback( int fd, short swhat, void* ud )
{
char buf[100];
size_t readn = read( fd, buf, sizeof(buf)-1 );
if( readn > 0 )
{
buf[readn] = 0;
printf( "%s\n", buf );
}
else
(Continue reading)
RSS Feed