Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Aug 2005 21:28:43 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/usr.sbin/portsnap/portsnap portsnap.sh
Message-ID:  <200508132128.j7DLShWb080387@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
cperciva    2005-08-13 21:28:43 UTC

  FreeBSD src repository

  Modified files:
    usr.sbin/portsnap/portsnap portsnap.sh 
  Log:
  Correctly exit from extract_run() and update_run() if files needed are
  missing from ${WORKDIR}/files/.
  
  This bug was caused by the astonishing interaction of "return" and
  pipelines; in the following code, the "return" does not exit the
  function, but instead exits the subshell which was spawned for the last
  element of the pipeline; consequently, the output produced is "foo".
  
  foo() {
          echo bar | while read baz; do
                  if [ ${baz} = "bar" ]; then
                          return 1
                  fi
          done
  
          echo foo
  }
  
  Reported by:    simon
  
  Revision  Changes    Path
  1.7       +9 -4      src/usr.sbin/portsnap/portsnap/portsnap.sh



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508132128.j7DLShWb080387>