信号机制是Linux系统下进程间通信IPC的一种简单方式,本质是软件中断。(其他IPC还有管道,消息,共享内存,套接字)。 在C语境通过<signal.h>使用,在shell中通过kill或者快捷键发送信号。
大部分shell会在内部实现kill而不调用外部的/usr/bin/kill,这样的好处是Linux系统资源占满无法新建文件描述符时候,依旧能执行kill。
通过kill -l可以查看所有的信号。
As we known, Terminal has the ability to show image file. The typical protocals are iTerm2, sixel, kitty, etc. But there are also terminals which could only handle ASCII art pics(gnome-terminal, Terminal.app on Mac and the native tty on Ubuntu Server). Here is a good reference for the platform-capable protocal.
Thanks to yazi, I've written a script to detect different terminals and invoke proper image function tool.
show_company_logo() {