Fixes to spawn behaviour - (well more to catching bad behaviour)

It needs a redo - but patched so it doesn't die horribly.
This commit is contained in:
Dave C-J
2014-04-06 23:25:40 +01:00
parent 789d64f7ed
commit 61285a0ee8
2 changed files with 28 additions and 21 deletions

View File

@@ -32,6 +32,7 @@
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-tips">Tip: <i>spawn</i> expects only one command word - and appended args to be comma separated.</div>
</script>
<script type="text/x-red" data-help-name="exec">
@@ -39,6 +40,7 @@
<p>Provides 3 outputs... stdout, stderr, and return code.</p>
<p>By default uses exec() which calls the command, blocks while waiting for completion, and then returns the complete result in one go, along with any errors.</p>
<p>Optionally can use spawn() instead, which returns output from stdout and stderr as the command runs (ie one line at a time). On completion it then returns a return code (on the 3rd output).</p>
<p>Spawn only expect one command word, with all extra parameters to be comma separated and passed as the append.</p>
<p>The optional append gets added to the command after the <b>msg.payload</b> - so you can do things like pipe the result to another command.</p>
</script>