code in Advanced Programming in the UNIX Environment