how do I terminate a pkexec tprocess? lazarus / 32-Linux ---------------------------------------------------------------------- Michael Collier · 2015-07-27 11:49 I tried using pkexec within tprocess to execute a program that runs in an infinite loop, and when I try to terminate the process i.e. Proc.terminate(-1) it doesn't seem to stop. If I leave out the pkexec then I can terminate. I'm new to pkexec, have I missed something? I'm guessing that I don't have enough privilege to terminate? I can kill the process from a terminal using sudo killall , so I could use another tprocess object to close my first tprocess (I guess..), but this is getting messy..?? ---------------------------------------------------------------------- Michael Collier · 2015-07-27 12:12 .. this seems to help, pkexec -u ---------------------------------------------------------------------- Basile B. · 2015-07-27 12:36 Try TAsyncProcess. For example if you have the GUI blocked during execution. You can try to kill the process in the event OnReadData() or elsewhere too.