Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

smokes

Interrupted system call and signal handler trouble

This topic is 5721 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a two threaded app. The main thread and a worker. I''ve installed a signal handler to catch SIGINT (CTRL+C) and SIGTERM to shutdown the app. My worker thread is checking a bool (protected by a mutex) to determine if it is time to shutdown, in every iteration of its main loop. The problem is that if I invoke the signal handler when the worker thread is calling select() it returns with System call interupted. First of all, when the system call is carryied out in another thread than the one which install the signal handler, why is the system call then interrupted?!? Secondly what causes pthread_join to exit with the error Illegal seek ?!?

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!