18 lines
423 B
Bash
Executable File
18 lines
423 B
Bash
Executable File
#!/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
|
|
|