How would i do this?
I want a program to lay around waiting to receive signals, I dont want it to use any CPU. How would i accomplish this?
How would i do this?
I want a program to lay around waiting to receive signals, I dont want it to use any CPU. How would i accomplish this?
You could put the program to sleep with whatever function your implementation supports (sleep(), delay(), etc.)
If you understand what you're doing, you're not learning anything.
What types of signals? getchar() works pretty well for keyboard input.
dwk
Seek and ye shall find. quaere et invenies.
"Simplicity does not precede complexity, but follows it." -- Alan Perlis
"Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
"The only real mistake is the one from which we learn nothing." -- John Powell
Other boards: DaniWeb, TPS
Unofficial Wiki FAQ: cpwiki.sf.net
My website: http://dwks.theprogrammingsite.com/
Projects: codeform, xuni, atlantis, nort, etc.
Thanks, just what i was looking for!