| 1 |
#!/usr/bin/python |
| 2 |
|
| 3 |
############################################################################### |
| 4 |
# WARNING! Importing this script will break the exec plugin! # |
| 5 |
############################################################################### |
| 6 |
# Use this if you want to create new processes from your python scripts. # |
| 7 |
# Normally you will get a OSError exception when the new process terminates # |
| 8 |
# because collectd will ignore the SIGCHLD python is waiting for. # |
| 9 |
# This script will restore the default SIGCHLD behavior so python scripts can # |
| 10 |
# create new processes without errors. # |
| 11 |
############################################################################### |
| 12 |
# WARNING! Importing this script will break the exec plugin! # |
| 13 |
############################################################################### |
| 14 |
|
| 15 |
import signal |
| 16 |
import collectd |
| 17 |
|
| 18 |
def init(): |
| 19 |
signal.signal(signal.SIGCHLD, signal.SIG_DFL) |
| 20 |
|
| 21 |
collectd.register_init(init) |