/** * * @File : exo_01_TuQuoqueFili_b.cxx * * @Authors : D. Mathieu * M. Laporte * * @Date : 2002 * * @Version: petite adaptation A. B. Dragut 2011 * * @Synopsis : Utilisation de kill() * **/ #include #include #include // SIGKILL #include // getppid(), sleep() #include // pid_t #include "CExc.h" #include "nsSysteme.h" // Fork(), Kill() using namespace nsSysteme; // Fork(), Kill() using namespace std; int main (int argc, char * argv[]) { try { if (1 != argc) throw CExc("main()",string ("Usage : ") + argv [0]); ::pid_t n; if (!(n = Fork ())) { ::sleep (3); Kill (n, SIGKILL); } else Kill (::getppid (), SIGKILL); return 0; } catch (const CExc & Exc) { cerr <