Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Dec 2010 00:07:27 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/bin/sh expand.c memalloc.c memalloc.h
Message-ID:  <201012120007.oBC07qGl069615@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
jilles      2010-12-12 00:07:27 UTC

  FreeBSD src repository

  Modified files:
    bin/sh               expand.c memalloc.c memalloc.h 
  Log:
  SVN rev 216387 on 2010-12-12 00:07:27Z by jilles
  
  sh: Remove the herefd hack.
  
  The herefd hack wrote out partial here documents while expanding them. It
  seems unnecessary complication given that other expansions just allocate
  memory. It causes bugs because the stack is also used for intermediate
  results such as arithmetic expressions. Such places should disable herefd
  for the duration but not all of them do, and I prefer removing the need for
  disabling herefd to disabling it everywhere needed.
  
  Here documents larger than 1024 bytes will use a bit more CPU time and
  memory.
  
  Additionally this allows a later change to expand here documents in the
  current shell environment. (This is faster for small here documents but also
  changes behaviour.)
  
  Obtained from:  dash
  
  Revision  Changes    Path
  1.77      +0 -8      src/bin/sh/expand.c
  1.34      +0 -6      src/bin/sh/memalloc.c
  1.15      +0 -1      src/bin/sh/memalloc.h



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