Welcome to the Linux Foundation Forum!

Chapter 4, killall and pkill, warning about Unix Sys V

kamelasa
kamelasa Posts: 5
edited August 2020 in LFS201 Class Forum

Hi,

a warning about killall command might be in place.

On Unix Sys V systems such as solaris and AIX it has quite a different meaning.

The linux man pages is a bit vague about this:
Be warned that typing killall name may not have the desired effect on non-Linux systems, especially when done by a privileged user.

The FreeBSD man page does a better job of explaining:
This FreeBSD implementation of killall has completely different semantics
as compared to the traditional UNIX System V behavior of killall. The
latter will kill all processes that the current user is able to kill, and
is intended to be used by the system shutdown process only.

People used to administer GNU/Linux systems might be quite surprised the first time they execute "sudo killall" on a SysV system, since it will kill all processes that the users is allowed to kill.

Comments

  • coop
    coop Posts: 879

    This is true. However, folks coming to Linux from one of these older systems probably know it is only supposed to be used there during shutdown probably. I looked it up and the actual standard seems to be rather unspecified, so this "feature" is really more of a bug. The warning is, as you say, quite clear in the killall man page. Thanks for being alert.

Categories

Upcoming Training