pt-kill shouldn't check if STDIN is a tty when --daemonize is given
Bug #894255 reported by
William Shallum
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Daniel Nichter |
Bug Description
I'm trying to run pt-kill from monit. STDIN is not a tty then. The problem is that pt-kill assumes it is going to read processlist from STDIN and I can find no way of disabling that assumption.
I don't think anyone would actually pipe a processlist to a process that is going to be daemonized so wouldn't it be better to check the --daemonize flag first before checking that STDIN is a tty?
Percona Toolkit version: 1.0.1
Thanks,
William
Related branches
tags: | added: pt-kill |
Changed in percona-toolkit: | |
status: | New → Fix Committed |
assignee: | nobody → Daniel Nichter (daniel-nichter) |
milestone: | none → 2.0.3 |
importance: | Undecided → Medium |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Changed in percona-toolkit: | |
status: | Fix Released → Fix Committed |
milestone: | 2.0.3 → 2.0.4 |
summary: |
- pt-kill: when --daemonize is given, should not check that stdin is a tty + pt-kill shouldn't check if stdin is a tty when --daemonize is given |
summary: |
- pt-kill shouldn't check if stdin is a tty when --daemonize is given + pt-kill shouldn't check if STDIN is a tty when --daemonize is given |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I believe this also affects pt-kill when run from cron. I'd be happy to supply a patch, but I'm not sure which behavior is intended. The docs say that '-' specified as a file trigger reading STDIN, however the last usage example shows STDIN detection:
mysql -e "SHOW PROCESSLIST" | pt-kill --busy-time 60 --print
My personal preference would be for pt-kill to require '-' when used in this way.