graveyard / gearcmd

Utility to create gearman workers out of command-line programs
Apache License 2.0
13 stars 0 forks source link

Fix sigterm-forwarding #54

Closed d-sparks closed 8 years ago

d-sparks commented 8 years ago

Previously, what was happening was that the SIGTERM was being forwarded from gearcmd to its entire process group, which sent a second, uncaught sigterm to gearcmd.

d-sparks commented 8 years ago

I updated the unit test to actually test the functionality, and also tested manually by building a local copy, connecting it to my local gearman, running jobs and killing the gearcmd PID and verifying that its child process's sigterm handling kicks in.

johnhuangclever commented 8 years ago

I remember adding this back in the day (right after I joined Clever) and I dug up the original ticket that caused this change to be made: https://clever.atlassian.net/browse/SCHOOLS-22?focusedCommentId=34890&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-34890

I think we will have to change gaprov-worker's bash script to forward the sigterm properly before we merge this change in.

d-sparks commented 8 years ago

@johnhuangclever That's not necessary, gaprov-worker doesn't use --pass-sigterm.

natebrennand commented 8 years ago

LGTM after the log is fixed