Bug#423259: boinc-client: Use advanced scheduling

Frank S. Thomas frank at thomas-alfeld.de
Mon Jun 25 11:04:47 UTC 2007


package boinc-client
tags 423259 - patch
thanks

Hi,

On Friday 11 May 2007, Omen Wild wrote:
> The while loop waiting for the pid file may seem like overkill but I've
> had a couple times where it took a little while for the pid file to
> show up.

> +  if ! is_running; then
> +    log_progress_msg "not running"
> +    log_end_msg 0
> +  else
> +    local pid max
> +    max=5
> +    while [[ $max -gt 0 ]]; do
> +      if [[ -f $PIDFILE ]]; then
> +        pid=$(cat $PIDFILE)
> +        break
> +      fi
> +      sleep 1
> +      max=$((max-1))
> +    done

When the else statement is executed is_running() already checked for the PID 
of the BOINC client. Why do you try to read the PID from $PIDFILE again? You 
should reuse is_running()'s $pid instead. Your patch also contains bashism:

$ checkbashisms boinc-client.init
possible bashism in boinc-client.init line 113 (cnt=$((cnt + 1)) does not work 
in dash):
      max=$((max-1))

Therefore your patch is unfit for inclusion into the package, please fix these 
issues first, thanks.

Grüße,
Frank
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.alioth.debian.org/pipermail/pkg-boinc-devel/attachments/20070625/955c024e/attachment.pgp 


More information about the pkg-boinc-devel mailing list