How to launch a detached process from Bamboo task?

One of our builds requires starting up a small service process on the machine prior to running tests. I thought I could do this as a script task by just running something like:

tcsh -c "start_my_service&"

The service does start and runs as a detached process (is no longer a child of Bamboo's java process). However, the bamboo build just hangs after that and doesn't move on to the next task. Is there a good way to launch a service and not have Bamboo wait for it but move on to the next task?

1 answer

1 accepted

Hello Brent,

Could you please check the hints I've left in https://jira.atlassian.com/browse/BAM-11488 ? I think you can run 'detached process' if you redirect all input/output streams and use "nohup". But I never confirmed if my solution is working on a real environment...

I tried the solution in that Jira ticket and it worked. Thanks! Add this to my Bamboo wishlist -- A checkbox in the script task on whether you want to wait for the task to complete or not so the user doesn't have to think about the magical incantation.

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

464 views 2 5
View question

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you