TProcess.Execute/Terminate with root privileges for child process lazarus / 32-Linux ---------------------------------------------------------------------- sporer@sctn.de · 2019-06-17 12:55 I'am launching an external process on a Raspberry PI (debian jessie) with TProcess. This external process is attempting to set it's own priority via the Linux scheduler to a value of 80. When I configure it in TProcess.CommandLine without "sudo" (/home/pi/ext_process) the scheduler refuses to increase the PR value; I can execute the external process with PR=20 and terminate it at any time, as it is supposed to be. On the other side, when I configure the CommandLine with "sudo" (sudo /home/pi/ext_process) the scheduler increases the priority to 80, but then I cannot terminate it any more (TProcess.Terminate). And this is even the case, when I start the parent process (sudo /home/pi/parent) with root privileges. Does anyone have an idea how to resolve this? Thanks in advance ---------------------------------------------------------------------- marcov · 2019-06-17 13:08 It doesn't make sense that an ordinary user would be able to terminate root processes. So without special software like a special sudo this is hard, and beyond the ability of normal compilers. You need kernel cooperation for that. ---------------------------------------------------------------------- bylaardt · 2019-06-17 13:11 Quote from: sporer@sctn.de on June 17, 2019, 02:55:18 pmDoes anyone have an idea how to resolve this? Run your application as root ---------------------------------------------------------------------- sporer@sctn.de · 2019-06-17 13:17 by bylaardt: Run your application as root Yes I was also trying this. The result is the same. ---------------------------------------------------------------------- sporer@sctn.de · 2019-06-17 13:52 Quote from: marcov on June 17, 2019, 03:08:01 pmIt doesn't make sense that an ordinary user would be able to terminate root processes. So without special software like a special sudo this is hard, and beyond the ability of normal compilers. You need kernel cooperation for that. Ok, understood. I will just manage with PR=20. Obviously there is no perceptible difference (latency) with PR=20. (The external process is streaming VoIP, the application is performing the signalling protocol that controls the RTP stream)