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

This widget could not be displayed.

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
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

197 views 1 3
Join discussion

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