the syncmail script
Bill Nottingham
notting at redhat.com
Tue Jan 8 17:39:49 UTC 2008
Mike McGrath (mmcgrath at redhat.com) 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
More information about the Fedora-infrastructure-list
mailing list