N
N
Net_Ranger2014-08-03 14:38:44
linux
Net_Ranger, 2014-08-03 14:38:44

Kill doesn't work for jobs. Why?

The situation is shown in the screenshot. jobs | kill -s SIGTERM %1 didn't help.fa8d9f8eaee24d3eb0415ed1532b5d22.JPG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Semyon Voronov, 2014-08-03
@Net_Ranger

sudo is a utility that elevates privileges to root because of the setuid attribute set on it.
s - means the user calling the utility gets the rights of the owner of this file, in the case of sudo - root
Suspended tasks for the current user will not be found in an environment with elevated privileges from sudo.

[email protected]:~$ id
uid=1000(gin) gid=1000(gin) группы=1000(gin)
[email protected]:~$ sudo id
uid=0(root) gid=0(root) группы=0(root)

Variable %1 - stores the id of the minimized process of the current user, not root, an attempt to run kill under sudo will search for minimized tasks from root.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question