Thanks Nathan.
Yes the _unlock was a little enthusiastic. The continue is OK as there
is no log files in /var/tmp/pcp/pmlogger to inspect and we should just
fall into the code after this for loop as there are no more arguments
for this for loop ... but break is probably clearer than continue, so
I've made that change also.
The rediffed patch is attached.
On Thu, 2008-11-27 at 09:42 +1100, Nathan Scott wrote:
> On Wed, 2008-11-26 at 20:00 +1100, Ken McDonell wrote:
> > I don't have access to oss.sgi.com yet, so here is another patch that
> > fixes the pmlogger_daily problem with daylight saving transitions.
>
> Great - I look forward to the next daylight savings switch with
> much less trepidation!
>
> One question about the changes ...
>
> @@ -567,10 +530,18 @@ s/^\([A-Za-z][A-Za-z0-9_]*\)=/export \1; \1=/p
> fqdn=`pmhostname $host`
> for log in $PCP_TMP_DIR/pmlogger/[0-9]*
> do
> - [ "$log" = "[0-9]*" ] && continue
> + case "$log"
> + in
> + *[0-9]*)
> + # no pmlogger running according to
> $PCP_TMP_DIR/pmlogger,
> + # nothing to be done!
> + _unlock
>
> This _unlock and continue pair looks a bit dubious. We're going
> to "continue" the inner loop here not the outer one, which means
> we'd potentially prematurely _unlock, wouldn't we?
>
> + continue
> + ;;
> + esac
>
>
> cheers.
>
> --
> Nathan
>
pcp.patch
Description: Text Data
|