posix process code (incomplete)