Advanced Programming in the UNIX Environment sample code