Node.js - Child Processes
What is the main advantage of using
spawn in Node.js for running commands compared to exec?spawn in Node.js for running commands compared to exec?spawn behaviorspawn runs commands and streams their output as it happens, without waiting for the whole output to finish.execexec buffers the entire output before returning it, which can cause delays or memory issues with large outputs.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions