![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sleep working | meetbhattu | UNIX for Advanced & Expert Users | 2 | 10-29-2007 02:05 PM |
| Sleep less than 1 second | bjorno | UNIX for Dummies Questions & Answers | 9 | 08-25-2005 12:55 AM |
| system sleep | tamemi | UNIX for Dummies Questions & Answers | 8 | 01-02-2004 02:23 PM |
| Sleep under one second | Scoogie | Shell Programming and Scripting | 5 | 08-14-2002 05:10 AM |
| sleep | Anna | UNIX for Dummies Questions & Answers | 5 | 07-10-2001 08:52 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sleep() not working
I have a function that quits a program when <ctrl>c is entered as per following code;
Code:
void quitter (void)
{
clear ();
mvprintw (QUITTER_ROW, QUITTER_COL, "Quitting...");
refresh ();
sleep (15);
endwin ();
exit (1);
}
Code:
signal (SIGINT, quitter); |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
sleep in implemented with signals and now you are trying to nest handlers. Go back to your other thread and look at porter's comments about too much code in a handler. Reduce to quiter function to just setting a flag and it will work.
|
|
#3
|
|||
|
|||
|
I had an alarm signal interrupting the sleep() function.
|
|||
| Google The UNIX and Linux Forums |