Quantcast
Channel: Forward SIGTERM to child in Bash - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 6

Forward SIGTERM to child in Bash

$
0
0

I have a Bash script, which looks similar to this:

#!/bin/bash
echo "Doing some initial work....";
/bin/start/main/server --nodaemon

Now if the bash shell running the script receives a SIGTERM signal, it should also send a SIGTERM to the running server (which blocks, so no trap possible). Is that possible?


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>