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,
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?