[Live-devel] exit(0) in a library?

Ross Finlayson finlayson at live555.com
Thu Oct 13 17:55:26 PDT 2005


>Unfortunately the BasicTaskScheduler::SingleStep treats as fatal the
>return of select() if less than zero (I'm using linux).
>It may happens when a signal is launched like SIGUSR1... and this is my
>case!
>I know that i can override this method using my code, but the question
>is: why exit?

Basically, because I wasn't sure what else to do.  If "select()" 
returns unexpectedly, then I didn't want to just ignore it, because - 
depending on the circumstances - it may end up doing the same thing 
every subsequent time in the event loop - leading to an infinite CPU loop.

As you noted, you can - if you wish - define your own subclass of 
"BasicTaskScheduler0" that redefines the "SingleStep()" routine to 
treat unexpected returns from "select()" as being a new type of 'event'.


	Ross Finlayson
	Live Networks, Inc. (LIVE555.COM)
	<http://www.live555.com/>



More information about the live-devel mailing list