Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to launch a detached process from Bamboo task?

Brent Villalobos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 10, 2012

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

1 vote
Answer accepted
PiotrA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 10, 2012

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...

Brent Villalobos
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 11, 2013

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
TAGS
AUG Leaders

Atlassian Community Events