argument vector
The list of separate strings a program is started with: its own name followed by each argument.
In more detail
The list of separate strings a program is started with: its own name followed by each argument. Passing arguments as a list keeps each one intact, with no shell splitting or interpretation.
Example
A Node.js script reads its arguments from process.argv; child_process.spawn() takes them as an array.Related terms
- spawn() — The node:child_process function that starts a program with a list of arguments and gives you its standard input, output and error as streams.
- command-line flag — An option typed after a program's name to change how it runs, such as --watch in node --watch server.js.
- command injection — An attack where input meant as data, such as a file name or form field, gets run as commands because a program built code from it.
- child process — A process started by another process, its parent, from which it inherits a copy of the environment and current directory.
Taught in
- Child Processes: spawn, execFile, fork & IPC — Node.js Internals & Backend Services
- Injection In All Its Forms — Application Security & Threat Modeling for Engineers
- Static Application Security Testing — Application Security & Threat Modeling for Engineers