How can i get process id of UNIX command i am triggering in a Perl script?

前端 未结 2 560
北海茫月
北海茫月 2021-01-15 13:18

I am triggering a UNIX command in Perl script.

I need the process ID of the UNIX command.

For example if i trigger below UNIX command:

# padv         


        
2条回答
  •  情深已故
    2021-01-15 14:00

    Call fork to create a child process. The process ID of the child process is returned to the parent process. The child process can then call exec to execute the program you want.

提交回复
热议问题