#3727 SIGTERM ignored in start_stop.cgi

1.440
closed-fixed
Jamie Cameron
5
2010-08-04
2010-08-03
Anonymous
No

why do the following lines appear in the init/start_stop.cgi script ( 1.441 release but not in 1.310) :
# In case the action was Webmin
$SIG{'TERM'} = 'IGNORE';

(this prevents a jboss server being stopped properly by creating a bootup/shutdown action)

Discussion

  • Jamie Cameron
    Jamie Cameron
    2010-08-03

    This is intentional, so that when you restart Webmin from that script it doesn't kill itself before the restart completes. How does this break jboss exactly though?

     
  • thanks for your answer.
    as SIGTERM signal is now trapped, the default jboss init script for redhat cannot stop the jboss process because it uses a kill -15 instruction.
    So put into a comment the #$SIG{'TERM'} = 'IGNORE'; in the start_stop.cgi script and it works, but I don't think it's the right way do fix it.
    Which webmin release this change occured ?

     
  • Jamie Cameron
    Jamie Cameron
    2010-08-04

    I'll change this line in the next Webmin release to :

    $SIG{'TERM'} = sub { };

    which won't be inherited, and thus will solve this issue.

     
  • Jamie Cameron
    Jamie Cameron
    2010-08-04

    • status: open --> closed-fixed
     
  • # In case the action was Webmin
    #$SIG{'TERM'} = 'IGNORE';
    $SIG{'TERM'} = sub { };

    right, it works. Thank you.