Re: the syncmail script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mike McGrath (mmcgrath@xxxxxxxxxx) said: 
> /me wonders if this might work:
> 
> #!/bin/bash
> 
> message() {
>     echo "Its not done yet.  Chill";
> }
> 
> echo "I take a while to complete"
> # sleep 5 would be replaced with the syncmail script
> sleep 5 &
> pid=$!
> while ps $pid > /dev/null
> do
>     trap message INT
>     sleep .2
> done

Wouldn't that still have a (minimal) race window where it could
be interrupted?

Bill

_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux