What is the difference between SIGSTOP and SIGTSTP? What is the difference between SIGSTOP and SIGTSTP? unix unix

What is the difference between SIGSTOP and SIGTSTP?


Both signals are designed to suspend a process which will be eventually resumed with SIGCONT. The main differences between them are:

  • SIGSTOP is a signal sent programmatically (eg: kill -STOP pid ) while SIGTSTP (for signal - terminal stop) may also be sent through the tty driver by a user typing on a keyboard, usually Control-Z.

  • SIGSTOP cannot be ignored. SIGTSTP might be.


/usr/include/x86_64-linux-gnu/bits/signum.h

#define SIGSTOP     19  /* Stop, unblockable (POSIX).  */#define SIGTSTP     20  /* Keyboard stop (POSIX).  */


SIGSTOP can't be ignored by the targetted process.

A good example of that is the video player mpv, it can ignore SIGTSTP but not SIGSTOP.

You can test with a video running :

kill -SIGTSTP $(pidof mpv)andkill -SIGSTOP $(pidof mpv)

Of course kill -SIGCONT $(pidof mpv) to resume playing.