Yelp / pgctl

Manage sets of developer services -- "playground control"
http://pgctl.rtfd.org
MIT License
32 stars 15 forks source link

s6-log processes can get left behind (SIGTERM isn't enough) #194

Closed 0xngold closed 7 years ago

0xngold commented 7 years ago

s6-log doesn't immediately terminate when SIGTERM is sent to it; instead, it "instructs s6-log to stop reading stdin after the next newline and exit after logging the last line." The trouble there is there should typically not be another newline coming from the supervised program after the SIGTERM is sent, because we stop the logger after the service.

Let's request that a SIGKILL be sent to s6-log instead of a SIGTERM. This could lead to minor log line loss at program shutdown, but we can always turn off multiline buffering later if that turns out to be a problem.