Sample code in the book: Beginning Linux Programming