Details
-
Bug
-
Status: Resolved
-
Low
-
Resolution: Fixed
-
None
-
None
-
Low
Description
The launch_service() function returns $? after exec'ing java, and the script then exits with that same status.
The problem is that we do a [ ! -z "$pidpath"] && ... conditional statment after exec'ing when the foreground flag isn't set. The value of $? then depends on that conditional and the statement, typically returning 1, because $pidpath isn't set. So, even if everything appears to execute normally, you will get an exit status of 1 for the whole script.
I suspect the right thing to do is just return 0 when backgrounding.