Sleep indefinitely
Hello all,
I am new to the Linux world. I have a small query. I have written a C program, wherein, I want to sleep/wait for ever in one of the function calls. I had used sleep(-1) for that. I could have used something like, while(1); But, with while(1) cpu resources would continue to be used. I am not sure if that is correct to use sleep(-1) or there are better ways of doing this. Can you guys please suggest? Thank you |
Maybe you could put the two together?
while ( 1 )Stevesleep(3600); |
All times are GMT -5. The time now is 08:59 AM. |