use pid_t for pid instead of string