process.argv0
process.argv0
属性存储了 Node.js 启动时传入的 argv[0]
原始值的只读副本。
$ bash -c 'exec -a customArgv0 ./node'
> process.argv[0]
'/Volumes/code/external/node/out/Release/node'
> process.argv0
'customArgv0'
The process.argv0
property stores a read-only copy of the original value of
argv[0]
passed when Node.js starts.
$ bash -c 'exec -a customArgv0 ./node'
> process.argv[0]
'/Volumes/code/external/node/out/Release/node'
> process.argv0
'customArgv0'