pile of some c unix stuff