|go ahead... be a heretic
Re^5: Working With The Process Table (AIX)by philipbailey (Curate)
|on Aug 05, 2011 at 21:27 UTC
Limbic~Region, members of PerlMonks can only respond to the requirements you have given. You start by saying I am currently working on building a library of tools so that others at the office can more easily write robust scripts. That sounds like you are only handling in-house code, which would be amenable to the suggestions you have been given. Now you say every vendor of every application. Which is it?
You also say you seem to be assuming I am trying to do something I am not. Well perhaps you should more clearly state what it is that you need. But if you read what I said carefully, I have suggested that you could put multiple PIDs in a file relating to each script, allowing you to keep track of as many as you want.
On the scenario of a script (1) dying without cleaning up the relevant PID entry and (2) another process with the same PID coming into existence, sure that's possible. So, also check the command line for that PID when deciding whether to clean it up (or the owner of the process or GID or the parent PID or all of the above). That is more certain than only checking the contents of the process table.