child_process ਮੌਡੀਊਲ Node ਨੂੰ ਹੋਰ ਪ੍ਰੋਗ੍ਰਾਮ/ਕਮਾਂਡਾਂ (ਸ਼ੈਲ ਕਮਾਂਡਾਂ, ਸਕ੍ਰਿਪਟਾਂ, ਹੋਰ ਬਾਇਨਰੀਜ਼) ਨੂੰ ਵੱਖ-ਵੱਖ OS ਪ੍ਰਕਿਰਿਆਵਾਂ ਵਜੋਂ ਚਲਾਉਣ ਦਿੰਦਾ ਹੈ। ਸਿਸਟਮ ਟੂਲਸ (git, ffmpeg ਆਦਿ) ਨੂੰ ਸੱਦਣ, CPU-ਭਾਰੀ ਕੰਮ ਨੂੰ ਮੁੱਖ ਪ੍ਰਕਿਰਿਆ ਤੋਂ ਬਾਹਰ ਚਲਾਉਣ, ਜਾਂ ਹੋਰ ਪ੍ਰੋਗ੍ਰਾਮਾਂ ਦਾ ਸਮਨਵਯ ਕਰਨ ਲਈ ਮਫ਼ੀਦ ਹੈ।
ਚਾਰ ਮੁੱਖ ਤਰੀਕੇ
exec → run a shell command, buffer all output (simple, small output)
execFile → run a file directly (no shell — safer, faster)
spawn → stream output (for large output / long-running processes)
fork → spawn a new NODE process with an IPC channel (Node-to-Node)
