Source codes example from book The Linux Programming Interface