Wait for a specific process to change state.
int waitpid(int pid, List<int>? stat_loc, int options) { if (stat_loc != null && stat_loc.isNotEmpty) { stat_loc[0] = 0; } return -1; }