Removed calls to system() replaced with sleep() and while

The program loops forever until a kill signal is received.
The thread sleeps at the specified interval. No longer
calling the shell.
Merge branch 'patch1' of github.com:Zintinio/Term-paper-1 into patch1