# Background process exits when pipeling is set to false

**URL:** <https://forum.ansible.com/t/background-process-exits-when-pipeling-is-set-to-false/30963>\
**Category:** Ansible Project\
**Created:** [August 6, 2019, 12:25pm UTC](https://forum.ansible.com/t/background-process-exits-when-pipeling-is-set-to-false/30963 "2019-08-06T12:25:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johncy\_Joseph](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@Johncy\_Joseph](https://forum.ansible.com/u/Johncy_Joseph)\
**Post date:** [August 6, 2019, 12:25pm UTC](https://forum.ansible.com/t/background-process-exits-when-pipeling-is-set-to-false/30963/1 "2019-08-06T12:25:14Z")

</div>

Apologies if this not the right forum,

I have had pipelining enabled in ansible config. I had to disable it for a certain case. I disabled it in the ansible config (I should have done it more localized), Once pipe lining was disabled, some of the proven working scripts started failing.These are simple scripts which invokes a third party startup scripts, the thirdparty startup scripts starts few processes as background processes. It is simple shell module call similar to shell: path\_to\_script start\_all.

what appears to happen is , 2 processes being started as background proceeds die as soon as the ansible ssh exits when pipelining is disabled. But when pipilining is enabled, they continue to run in the background even after ansible finishes.

This is not an issue as such as I have a fix now. But would like to know why the behavior would defer. I do not have access to thirdparty script.

ansible version is 2.4.2

thanks a lot for any pointers.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [August 7, 2019, 2:45pm UTC](https://forum.ansible.com/t/background-process-exits-when-pipeling-is-set-to-false/30963/2 "2019-08-07T14:45:01Z")

</div>

pipelining kept the ssh connection open, normally tasks will  
open/execute/close the connection, which includes tty. Most 'services'  
should detach correctly, but many don't, this seems to be your case.

#1 i would make these into actual services and use your service  
manager to handle them

#2 if you really cannot, look into using nohup/dtach and &  
backgrounding in shell

---

<div class="post-metadata">

**Author:** ![Johncy\_Joseph](https://avatars.discourse-cdn.com/v4/letter/j/e56c9b/32.png) [@Johncy\_Joseph](https://forum.ansible.com/u/Johncy_Joseph)\
**Post date:** [August 9, 2019, 1:36pm UTC](https://forum.ansible.com/t/background-process-exits-when-pipeling-is-set-to-false/30963/3 "2019-08-09T13:36:16Z")

</div>

thanks Brian
