[wildfly-dev] Powershell scripts

Rostislav Svoboda rsvoboda at redhat.com
Thu Oct 1 08:17:05 EDT 2015


> Right this is my concern. The behavior is different as the bash
> scripts don't exit. They wait for the process to end. Maybe it's
> correct to be different, I don't know.

If you send signal 10 (kill -l 10 returns USR1) AS got restarted thanks while loop - https://github.com/wildfly/wildfly-core/blob/master/core-feature-pack/src/main/resources/content/bin/standalone.sh#L299
and it doesn't matter if you execute it normally or with LAUNCH_JBOSS_IN_BACKGROUND

don't know what the real use case is to get it restarted
wildfly-init-redhat.sh and wildfly-init-debian.sh do restart by stop&&start
  	restart)
		$0 stop
		$0 start
EAP 6.4.3 RPM init.d script does stop&&start too
  restart|reload)
      stop
      sleep 3
      start
      RETVAL=$?
      ;;

There is some magic in the .sh scripts with number 128 and it's related wait command / bash / signals
  http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html#sect_12_02_02
  http://veithen.github.io/2014/11/16/sigterm-propagation.html

> 
> Yeah, it looks like that LAUNCH_IN_BACKGROUND behavior is pretty much
> implemented
> to satisfy the init.d script we have and is not really useful if you run it
> directly.

it is used in: 
  https://github.com/wildfly/wildfly-core/blob/master/core-feature-pack/src/main/resources/content/docs/contrib/scripts/init.d/wildfly-init-redhat.sh
  https://github.com/wildfly/wildfly-core/blob/master/core-feature-pack/src/main/resources/content/docs/contrib/scripts/init.d/wildfly-init-debian.sh

read kpid < $JBOSS_PIDFILE in stop function

> If that is really so, I am not a fan of having that in standalone.sh
> directly...
> 

domain.sh has the same mechanism LAUNCH_JBOSS_IN_BACKGROUND + JBOSS_PIDFILE
If it's removed from both files something will have to be added to the init/systemd scripts.

Cheers.
Rostislav


More information about the wildfly-dev mailing list