use pid_t type for pid
include limits.h for PATH_MAX