usual apue codes and some exercise