LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2009, 01:35 AM   #1
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 150

Rep: Reputation: 15
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

Last edited by nagendrar; 09-15-2009 at 01:36 AM.
 
Old 09-14-2009, 07:21 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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
 
Old 09-15-2009, 01:37 AM   #3
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 150

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
posix threads, help with exit routine laucian Programming 3 06-05-2008 10:39 PM
Warning: at kernel/exit.c:814 do exit() (Tainted: P ) <- nVidia video problem? Hitboxx Fedora 2 10-06-2007 10:47 PM
kill threads on fork, no exit handlers? ta0kira Programming 3 08-16-2007 08:15 PM
Answer column for threads, other suggestions Malice132 LQ Suggestions & Feedback 8 10-09-2004 01:04 PM


All times are GMT -5. The time now is 01:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration