You cannot, at least not for the process being killed.
What you can do is arrange for the parent process to watch for the child process’s death, and act accordingly. Any decent process supervision system, such as daemontools, has such a facility built in.
Related Contents:
- What’s the best way to send a signal to all members of a process group?
- What killed my process and why?
- Handling multiple SIGCHLD
- How do SO_REUSEADDR and SO_REUSEPORT differ?
- Argument list too long error for rm, cp, mv commands
- How do I write a bash script to restart a process if it dies?
- How to redirect output to a file and stdout
- How to prevent a background process from being stopped after closing SSH client in Linux
- How to automatically redirect HTTP to HTTPS on Apache servers?
- Nasm segmentation fault on RET in _start
- Better way to rename files based on multiple patterns
- What’s the difference between nohup and ampersand
- Forcing bash to expand variables in a string loaded from a file
- Sorting multiple keys with Unix sort
- Redirect STDERR / STDOUT of a process AFTER it’s been started, using command line?
- Makefiles with source files in different directories
- How to instruct cron to execute a job every second week?
- Setting the umask of the Apache user
- Difference between ${} and $() in Bash [duplicate]
- Linux PID recycling [closed]
- Shell command to tar directory excluding certain files/folders
- How do I rename all folders and files to lowercase on Linux?
- How do you normalize a file path in Bash?
- Automatically run a program on startup under Linux Ubuntu [closed]
- Make $JAVA_HOME easily changable in Ubuntu [closed]
- Exit code of variable assignment to command substitution in Bash
- crontab PATH and USER
- Linux command to print directory structure in the form of a tree
- ‘find -exec’ a shell function in Linux
- Mount SMB/CIFS share within a Docker container
- How to use ‘cp’ command to exclude a specific directory?
- What does O_DIRECT really mean?
- How can I run a function from a script in command line?
- How to get file creation date/time in Bash/Debian?
- Pipe output to bash function
- How can I add a default include path for GCC in Linux?
- Determine direct shared object dependencies of a Linux binary?
- Difference between Real User ID, Effective User ID and Saved User ID
- Why Linux/gnu linker chose address 0x400000?
- How to reset Jenkins security settings from the command line?
- Run bash script as daemon
- Get current time in seconds since the Epoch on Linux, Bash
- Concatenating Files And Insert New Line In Between Files
- Linux non-blocking fifo (on demand logging)
- Number of executed Instructions different for Hello World program Nasm Assembly and C
- How to create a link to a directory on linux [closed]
- Docker in Docker cannot mount volume
- Randomly shuffling lines in Linux / Bash
- When should I use TCP_NODELAY and when TCP_CORK?
- Difference between shell and environment variables