0

I am trying to kill a process in a C++ program (Linux). I know exactly the name of the program to kill. If I try in Bash

pkill process-name

the process is killed normally.

If in a simple C++ program I run in main

system("pkill process-name")

the process continues to run.

I have no idea why...

Melebius
  • 6,183
  • 4
  • 39
  • 52
Talkanian
  • 19
  • 1
  • 5

0 Answers0