LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   suggestions to exit all threads at midnight (https://www.linuxquestions.org/questions/linux-newbie-8/suggestions-to-exit-all-threads-at-midnight-754986/)

nagendrar 09-14-2009 12:35 AM

suggestions to exit all threads at midnight
 
I want to exit all threads at midnight 1pm. So I used exit(0) function calling but it gives some crashes because of improper closing of threads. So I replaced exit(0) with exit_group(0), but it gives compilation errors.

So please give suggestions to exit all threads at midnight.


ThanQ
Nagendra R

chrism01 09-14-2009 06:21 PM

Depends on the lang, but if it's C, look at pthread_cancel()
http://www.cs.cf.ac.uk/Dave/C/node29...00000000000000
http://www.cs.cf.ac.uk/Dave/C/node32...00000000000000

nagendrar 09-15-2009 12:37 AM

This is in c lang.
Here different threads are used in different .cpp files and exit the execution at mid night in main() function.So I want to exit the all threads before this exit(i.e. from main exit).

ThanQ,
Nagendra R


All times are GMT -5. The time now is 12:59 PM.