Logo Search packages:      
Sourcecode: launchtool version File versions  Download package

bool Pidfile::kill ( int  sig  )  throw (SystemException)

Kill the pid contained in the pidfile with signal `sig'. Returns false if no corresponding process is running

Definition at line 64 of file Pidfile.cc.

References is_active(), and read().

{
      if (!is_active())
            return false;
      pid_t pid = read();
      if (::kill(pid, sig) == -1)
            throw SystemException(errno, "Killing process " + fmt(pid));
      return true;
}


Generated by  Doxygen 1.6.0   Back to index