I have here a script to test a background function.
When squeeze is launched two processes and I do not understand why.
One stops at "sleep 20", and the other runs forever.
#!/bin/bash
back(){
n=0
while [ 1 ]
do
echo $n
n=$(($n+1))
sleep 5
done
}
back &
sleep 20
exit
command "ps -a" in the call:
PID TTY TIME CMD
8964 pts/2 00:00:00 backgroundteste
8965 pts/2 00:00:00 backgroundteste
8966 pts/2 00:00:00 sleep
8982 pts/2 00:00:00 sleep
after "sleep 20":
PID TTY TIME CMD
8965 pts/2 00:00:00 backgroundteste
9268 pts/2 00:00:00 sleep
Then forget about it ...
Why?