code snippet for fork, exec