SERVER / SPAWN
Run a controlled process
spawn is a server-only declaration that runs an installed command through Dowe's Dowe-owned process runtime. It binds the process result without executing Dowe source through Node.js.
1 / MENTAL MODEL
Declare the result binding first
The name after spawn is the variable for the final process result. command and args remain separate, so Dowe does not parse a shell command string.
handler inspectMedia
spawn ffmpeg command:"ffmpeg" args:["-version"] timeoutMs:5000 maxOutputBytes:65536
return json:{ ok:ffmpeg.ok stdout:ffmpeg.stdout stderr:ffmpeg.stderr }Part | Contract |
|---|---|
No dataThere are no records to display | |
2 / OPTIONS
Bound output and process lifetime
Use timeoutMs and maxOutputBytes when a handler must wait for a tool. Use background:true only when the caller deliberately owns a long-lived helper.
init
spawn encoder command:"ffmpeg" args:["-re" "-i" "input.mp4"] cwd:"/srv/media" background:trueOption | Guidance |
|---|---|
No dataThere are no records to display | |