Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jun 2009 21:17:45 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/bin/sh eval.c eval.h input.c input.h main.c
Message-ID:  <200906132118.n5DLI81N078727@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
jilles      2009-06-13 21:17:45 UTC

  FreeBSD src repository

  Modified files:
    bin/sh               eval.c eval.h input.c input.h main.c 
  Log:
  SVN rev 194128 on 2009-06-13 21:17:45Z by jilles
  
  Avoid leaving unnecessary waiting shells in many forms of sh -c COMMAND.
  
  This change only affects strings passed to -c, when the -s
  option is not used.
  
  The approach is to check if there may be additional data
  in the string after parsing each command. If there is none,
  use the EV_EXIT flag so that a fork may be omitted in
  specific cases.
  
  If there are empty lines after the command, the check will
  not see the end and forks will not be omitted. The same
  thing seems to happen in bash.
  
  Example:
    sh -c 'ps lT'
  No longer shows a shell process waiting for ps to finish.
  
  PR:             bin/113860
  Reviewed by:    stefanf
  Approved by:    ed (mentor)
  
  Revision  Changes    Path
  1.61      +11 -8     src/bin/sh/eval.c
  1.13      +5 -0      src/bin/sh/eval.h
  1.24      +17 -0     src/bin/sh/input.c
  1.10      +1 -0      src/bin/sh/input.h
  1.31      +1 -1      src/bin/sh/main.c



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