Hello,
Would I be able to kill my own process using C++ on UNIX? i.e something like
void func() {
pid_t pid = getpid();
kill (pid, -9);
}
I am trying to do that, but it doesnt work. So can a process be killed only by another process and not from within itself?
Thanks,
-Arun
Would I be able to kill my own process using C++ on UNIX? i.e something like
void func() {
pid_t pid = getpid();
kill (pid, -9);
}
I am trying to do that, but it doesnt work. So can a process be killed only by another process and not from within itself?
Thanks,
-Arun