sorry, i misunderstood what i was reading, but thanks.<br><br>with that resolved, i do have a couple of other questions:<br>1. when using signal_add(), how does the timeout parameter affect the signal handler? i've set it to handle sigalrm and a timeout of 2. if i send the process sigalrm, nothing happens. i wait 2 seconds and nothing happens. but if i set it to 0, then it responds to my sigalrm's that i send it
<br>2. when using struct event to event_set and event_add, am i supposed to use a different struct for each event? i ask because i am setting an event for a fd and one for a signal. when i use the same event for both, i get errors. the errors are also different depending on the timeout value that i pass to the signal handler. if i pass a valid struct timeval to the signal_add, i'll get an abort and the program will dump core. if i pass it a 0 timeout value, i get an error about not being on the queue.
<br><br>sorry if this is something i should know. i'm just not understanding the documentation very well. thanks in advance for your help!<br><br><div><span class="gmail_quote">On 2/8/07, <b class="gmail_sendername">Niels Provos
</b> <<a href="mailto:provos@citi.umich.edu">provos@citi.umich.edu</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;">libevent doesn't do any pre-emptive scheduling. So, I don't
<br>understand your problem. Your code can run as long as it likes. It<br>just means that other events don't get handled in the meantime.<br><br>Niels.<br><br>On 2/8/07, Adam Chou <<a href="mailto:adam.chou@gmail.com">
adam.chou@gmail.com</a>> wrote:<br>> i have a critical section of code where once it starts running, it MUST<br>> finish. is there some way to stop libevent so that it doesn't interrupt the<br>> execution of my code or do i actually have to event_del() everything then
<br>> event_add() everything back when i'm done?<br>><br>> _______________________________________________<br>> Libevent-users mailing list<br>> <a href="mailto:Libevent-users@monkey.org">Libevent-users@monkey.org
</a><br>> <a href="http://monkey.org/mailman/listinfo/libevent-users">http://monkey.org/mailman/listinfo/libevent-users</a><br>><br>><br></blockquote></div><br>