GRAILS-10501 GRAILS-10522 Add shutdown hook thread to destroy the active forked processes