sample codes in the book: <Beginning Linux Programming>.