Operating System - HP-UX
1832295 Members
1932 Online
110041 Solutions
New Discussion

Re: How to execute a command (script) with specific PID?

 
Platinum
Occasional Advisor

How to execute a command (script) with specific PID?

Is it possible?
How to make it happen?
Thanks!!
3 REPLIES 3
Patrick Wallek
Honored Contributor

Re: How to execute a command (script) with specific PID?

The process ID (PID) of a script is assigned by the OS at run time. There is NO WAY that I know of to make a process have a specific PID.

I think there would be too much overhead with trying to do that because you would have to build in checks to make sure that the PID you want is not already being used.

Platinum
Occasional Advisor

Re: How to execute a command (script) with specific PID?

Thank you very much and Merry Christmas!
Rajeev  Shukla
Honored Contributor

Re: How to execute a command (script) with specific PID?

Thats right, Its not possible to run a process at a specific PID however you can run the process as a specific UID or GID but not PID. This assigned by the HPUX kernel itself and can not be altered.
Also you can change the priority of a process, but not what exactly you want.

Cheers
Rajeev