The essence of the task is that you need to block certain processes. It was decided to create a hook that would intercept system calls coming to the kernel.

But then the question arose: is there such a functional at the kernel level?

  • If you need to block on your system, then why not just configure it correctly? If you need to block on the user system, this is generally aggressive-hostile behavior towards the user, very atypical for Linux. - VladD
  • @VladD the point is to write something similar to a firewall that blocks the right applications ... - Max
  • And what yuzkeys? What is this useful for? (I have a purely theoretical interest, I am not an expert on Linux and its kernel.) - VladD
  • Are you talking about kernel modules? - avp
  • @avp yes, about them. - Max

1 answer 1

if you need to stop a process, send it a SIGSTOP signal. quote from man 7 signal :

The signals SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.

To continue the process after stopping, send him a SIGCONT signal.

details - in man 7 signal or, for example, on the Internet .

  • @alexander_barakin Be so kind as to explain how to send the necessary process to SIGSTOP - Max
  • @Max, in the same man, in the Sending a signal section, are six functions with which you can send signals to certain entities (processes, threads, groups of processes). each function has its own man page. or, if you are looking at a web page that I referred to, simply follow the link under the name of the function. - aleksandr barakin 3:18 pm