Welcome to the Linux Foundation Forum!

Ch4 Signals - pkill option -H

I have a question about signals I can't find the answer myself.
In the documentation and also in the man pages on this https://linux.die.net/man/1/pkill the example to Make syslog reread its configuration file: pkill -HUP syslogd
I can't find where the option -H comes from.
What is the meaning of the -H option in this?

Comments

  • robbnl
    robbnl Posts: 16

    OK, to answer myself, it looks like -H is not one of the options. -HUP stands for H(ang)UP. see https://www.pair.com/support/kb/paircloud-using-kill-killall-and-pkill/#sighup
    quote from the description:

    The SIGHUP (1) signal is now used to tell a process to reload the configuration file and re-initialize.

  • robbnl
    robbnl Posts: 16

    edit: typo H(ang) UP should be H(ung) UP.

  • robbnl
    robbnl Posts: 16

    Now I am thinking of it, I wrongly assumed -HUP being options. I understand it is a signal, not options for a signal. Am I correct?

  • coop
    coop Posts: 915
    c8:/tmp>kill -l
     1) SIGHUP   2) SIGINT   3) SIGQUIT  4) SIGILL   5) SIGTRAP
     6) SIGABRT  7) SIGBUS   8) SIGFPE   9) SIGKILL 10) SIGUSR1
    11) SIGSEGV 12) SIGUSR2 13) SIGPIPE 14) SIGALRM 15) SIGTERM
    16) SIGSTKFLT   17) SIGCHLD 18) SIGCONT 19) SIGSTOP 20) SIGTSTP
    21) SIGTTIN 22) SIGTTOU 23) SIGURG  24) SIGXCPU 25) SIGXFSZ
    26) SIGVTALRM   27) SIGPROF 28) SIGWINCH    29) SIGIO   30) SIGPWR
    31) SIGSYS  34) SIGRTMIN    35) SIGRTMIN+1  36) SIGRTMIN+2  37) SIGRTMIN+3
    .....
    

    kill - SIGHUP pid is the same askill -1 pid

  • Hi @robbnl ,

    To complement what Coop said, you can find a brief description about each signal in the man page for signal(7).

    Regards,
    Luis.

  • nicolasmendoza
    nicolasmendoza Posts: 22
    edited October 2020

    Also, I think that -HUP as a method for reloading process after config changes doesn't work for all "programs", of course, because each program process is free to handle/ignore specific SIGNALS, just the SIGKILL (9) cant be ignored

Categories

Upcoming Training