fix error: ‘getpid’ was not declared in this scope