| 1833 | */ |
| 1834 | template <typename C, typename T> |
| 1835 | inline basic_pstreambuf<C,T>* |
| 1836 | basic_pstreambuf<C,T>::killpg(int signal) |
| 1837 | { |
| 1838 | basic_pstreambuf<C,T>* ret = NULL; |
| 1839 | #ifdef _POSIX_JOB_CONTROL |
| 1840 | if (is_open()) |
| 1841 | { |
| 1842 | pid_t pgid = ::getpgid(ppid_); |
| 1843 | if (pgid == -1) |
| 1844 | error_ = errno; |
| 1845 | else if (pgid == ::getpgrp()) |
| 1846 | error_ = EPERM; // Don't commit suicide |
| 1847 | else if (::killpg(pgid, signal)) |
| 1848 | error_ = errno; |
| 1849 | else |
| 1850 | ret = this; |
| 1851 | } |
| 1852 | #else |
| 1853 | error_ = ENOTSUP; |
| 1854 | #endif |
| 1855 | return ret; |
| 1856 | } |
| 1857 | |
| 1858 | /** |
| 1859 | * This function can call pstreambuf::wait() and so may change the |
nothing calls this directly
no outgoing calls
no test coverage detected