27 lines
736 B
Bash
Raw Normal View History

2020-10-22 11:57:36 +02:00
################################################
# @ Author: JunkJumper
# @ Link: https://github.com/JunkJumper
# @ Copyright: Creative Common 4.0 (CC BY 4.0)
# @ Create Time: 22-10-2020 11:55:28
# @ Modified by: JunkJumper
# @ Modified time: 22-10-2020 11:56:09
################################################
#!/usr/bin/bash
#####################################
# M311 - CHIGNOLI #
# bash-trap.sh : demonstration de #
# de la gestion de signaux en bash #
#####################################
trap 'echo Ignore signal SIGINT' SIGINT
trap 'echo Ignore signal SIGSTOP' SIGSTOP
trap 'echo Ignore signal SIGUSR1' SIGUSR1
trap 'echo FIN ! ; exit' SIGUSR2
trap
while true
do
echo Je boucle ...
sleep 1
done