Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

launch.script can't stop app in supervisor #5273

Closed
tietang opened this issue Feb 29, 2016 · 3 comments
Closed

launch.script can't stop app in supervisor #5273

tietang opened this issue Feb 29, 2016 · 3 comments

Comments

@tietang
Copy link

tietang commented Feb 29, 2016

org/springframework/boot/loader/tools/launch.script

supervisor need to get APP PID that is running, but "sh spring-boot-app-exec.jar run" get two process, one is shell process, another is spring-boot-app process, but supervisor got a shell process, when executing stop command in supervisor, can't stop spring-boot-app process.

supervisor *.conf

command= sh spring-boot-app-exec.jar run

I add "exec" to "org/springframework/boot/loader/tools/launch.script" before "$command" , it works!

$command to exec $command

run() { 
  pushd "$(dirname "$jarfile")" > /dev/null
  exec $command
  result=$?
  popd
  return "$result"
}
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 29, 2016
@wilkinsona
Copy link
Member

I don't think we want to make the proposed change. Using exec significantly changes the semantics of the script as it replaces the shell with the command that's being run. For example, when run in a non-interactive shell, it will terminate when exec fails, rather than running the remainder of the script.

Why do you need to use sh spring-boot-app-exec.jar run as the command? You could make the jar itself executable and use spring-boot-app-exec.jar as run is the default action.

@wilkinsona wilkinsona added status: waiting-for-feedback We need additional information before we can continue and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 29, 2016
@spring-projects-issues
Copy link
Collaborator

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

@spring-projects-issues spring-projects-issues added the status: feedback-reminder We've sent a reminder that we need additional information before we can continue label Mar 7, 2016
@spring-projects-issues
Copy link
Collaborator

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@spring-projects-issues spring-projects-issues removed status: waiting-for-feedback We need additional information before we can continue status: feedback-reminder We've sent a reminder that we need additional information before we can continue labels Mar 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants