AIX PID Recycling

Had a bizzare problem last night with one of our tools running on an AIX server that has not come up before. The tool has been in use for over a year without this problem showing up.The tool basically does this: -Kick off a background task and record the PIDGo and do a bunch of other taskswait for the background task to completeIt seems that AIX immediately reuses PID's as they become available rather than incrementing the last PID and using that. So what happened last night was that the background task completed while the tool was doing the other stuff and the PID ended up being re assigned to the wait statement! So it sat there all night waiting for itself to complete......Has anyone come across this before?

The search function of the forum brought this which could be helpful:

You are not new to the forum so maybe put special questions to the appropriate subforum please :wink: Moving it to AIX subforum.

:slight_smile: sorry. Forgot there was a dedicated AIX forum

Interesting. Perhaps a solution is to run the long-running command in another shell, capture the return code in a file, and use the presence of the file to tell whether the original has exited?

Thanks, we went with parsing more fields from the ps output to make it a more robust pattern to test for.