| 1798 | */ |
| 1799 | template <typename C, typename T> |
| 1800 | inline basic_pstreambuf<C,T>* |
| 1801 | basic_pstreambuf<C,T>::kill(int signal) |
| 1802 | { |
| 1803 | basic_pstreambuf<C,T>* ret = NULL; |
| 1804 | if (is_open()) |
| 1805 | { |
| 1806 | if (::kill(ppid_, signal)) |
| 1807 | error_ = errno; |
| 1808 | else |
| 1809 | { |
| 1810 | #if 0 |
| 1811 | // TODO call exited() to check for exit and clean up? leave to user? |
| 1812 | if (signal==SIGTERM || signal==SIGKILL) |
| 1813 | this->exited(); |
| 1814 | #endif |
| 1815 | ret = this; |
| 1816 | } |
| 1817 | } |
| 1818 | return ret; |
| 1819 | } |
| 1820 | |
| 1821 | /** |
| 1822 | * Sends the specified signal to the process group of the child process. |