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&amp;"

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

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.

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.