Alex Balgavy

Just some stuff about me.

Here's my dotfiles repository.

Check out my blog.

My keys: PGP, SSH

My crypto wallets (BTC, XMR)


What links here:

Process groups

The nohup performs the following tricks:

that the SIGIGN is preserved after the execve() syscall..

When a controlling process loses its terminal connection, the kernel sends a SIGHUP signal to inform it of this fact. Shell processes (which are usually control terminals) have a handler to catch SIGHUP signals. Receiving a signal starts a fan-out process of sending SIGHUP signals to all jobs it has created and know about (remember the fg, bg and waitpid()).

The default action for the SIGHUP is terminate. Inside a shell, a process group is usually called a job. In its turn, each process group belongs to a session

cat /var/log/nginx.log | grep string | head # a process group with 3 processes

signal can be sent to all members of a process group by using killpg() or kill() with a negative PGID parameter.

https://biriukov.dev/docs/fd-pipe-session-terminal/3-process-groups-jobs-and-sessions/