the syncmail script
Mike McGrath
mmcgrath at redhat.com
Tue Jan 8 19:09:42 UTC 2008
On Tue, 8 Jan 2008, Bill Nottingham wrote:
> 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?
Grr, yes, it does. /me re-thinks
-Mike
More information about the infrastructure
mailing list