Intent: call an external application with specified arguments, and exit script.
The following script does not work as it should:
#!/usr/bin/node
var cp = require('child_process');
var MANFILE='ALengthyNodeManual.pdf';
cp.spawn('gnome-open', ['\''+MANFILE+'\''], {detached: true});
Things tried: exec – does not detach. Many thanks in advance
From node.js documentation:
You need to modify your code something like this: