<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Thanks Thomas. <br><br>That works for me. <br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Thomas Lindgren <u.thomas.lindgren@gmail.com><br>To: Rakesh K Sinha <rakesh_usenet@yahoo.com><br>Sent: Wednesday, July 11, 2007 2:15:47 PM<br>Subject: Re: [Libevent-users] Newbie Question - event_test.c hangs<br><br><br><br><div><span class="gmail_quote">On 7/11/07, <b class="gmail_sendername">Rakesh K Sinha</b> <<a rel="nofollow" target="_blank" href="mailto:rakesh_usenet@yahoo.com">rakesh_usenet@yahoo.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Hi - <br> I am a newbie to libevent , interested in the same because I am writing an high-performance server that is supposed to take a lot of transaction hits per second.
<br> I got the event test.c in the home page to get started. <br><span><a rel="nofollow" target="_blank" href="http://monkey.org/%7Eprovos/libevent/event-test.c">http://monkey.org/~provos/libevent/event-test.c
</a></span><br><br> I downloaded the latest version of libevent - 1.3a . Built the same. <br><br>When I try to run the application - I am seeing the following . <br><br>$ ./event-test<br>Write data to event.fifo<br><and then the application hangs>
<br><span style="font-weight: bold;"><br></span>What is the sample application supposed to do ? Why
would it hang on the event_dispatch() call at the end of main() . Am I missing something important here. Thanks for your help. </div></div></div></div></blockquote><div><br>Here's what I did:<br><br><div style="margin-left: 40px;">
<span style="font-family: courier new,monospace;">$ cat > event.fifo </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">foo</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">bar</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">$</span><br style="font-family: courier new,monospace;"></div><br>
and (in another window):<br><br><div style="margin-left: 40px;"><span style="font-family: courier new,monospace;">$ ./event-test</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">
Write data to event.fifo</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">fifo_read called with fd: 3, event: 2, arg: 0xbfb5f088</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">Read: foo</span><br style="font-family: courier new,monospace;"><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">fifo_read called with fd: 3, event: 2, arg: 0xbfb5f088
</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Read: bar</span><br style="font-family: courier new,monospace;"></div><br>Hope this helps.<br><br>Best,<br>Thomas<br>
<br></div><br></div><br>
</div><br></div></div><br>
<hr size=1>
Don't get soaked. Take a<a href="
http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news"> quick peak at the forecast </a><br> with the<a href="
http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news">Yahoo! Search weather shortcut.</a></body></html>