execlp() in python

后端 未结 2 835
甜味超标
甜味超标 2021-01-12 09:33

I was reading programming python 4th edition by Mark Luze, Oreilly, by teaching myself. There\'s an example on how to fork a child process, which I do not quite understand:<

2条回答
  •  一整个雨季
    2021-01-12 10:17

    The first argument is the program to execute (found on the PATH). The rest are the sys.argv arguments to the program.

    The first such argument is the program name used to invoke it, and the display value used in the OS process list. It is the value of sys.argv[0] in a python script.

提交回复
热议问题