# Exec node error when running terminal commands

**URL:** <https://discourse.nodered.org/t/exec-node-error-when-running-terminal-commands/1839>\
**Category:** General\
**Created:** [26 July 2018 18:21 UTC](https://discourse.nodered.org/t/exec-node-error-when-running-terminal-commands/1839 "2018-07-26T18:21:18Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [1 August 2018 23:13 UTC](https://discourse.nodered.org/t/exec-node-error-when-running-terminal-commands/1839/20 "2018-08-01T23:13:49Z")

</div>

If this is a long running script you may want to look at the node-red-node-daemon node as that can pass msg s into stdin of the process and listens to stdout and stderr (But of course assumes your script can accept input while running)

For exec You can tell msg.kill what type of signal to use to stop the process so you should be able to find one that kills it properly.

---

_[View the full topic](https://discourse.nodered.org/t/exec-node-error-when-running-terminal-commands/1839)._
