samedi 21 février 2015

capture the id of the process which called the function inside the function


I want to log the ID of the process which called a specific function in Korn shell scripting.


eg Lets consider an user-defined autoload function SQUARE. Now if a TestSquare.sh script calls SQUARE function. I want to capture the process id of the TestSquare.sh in execution and the start time of the TestSquare.sh process.


I do not want to pass any parameters to the fucntion. I want to construct all the information by using just the process id of the calling script.



Aucun commentaire:

Enregistrer un commentaire