Merged revisions 1026-1031 via svnmerge from
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 13 Jul 2007 18:54:00 +0000 (18:54 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Fri, 13 Jul 2007 18:54:00 +0000 (18:54 +0000)
commit6f7fdf6f1cfa0b2a4d5af174e9b3670d8b8b7964
treef7c22da0e0061076b9936eaf17b4ec1b48389dcd
parent3073f3f814d83e11d9c2d5217f89f468385cd067
Merged revisions 1026-1031 via svnmerge from
svn://svn.open-ils.org/OpenSRF/trunk

........
  r1029 | erickson | 2007-07-12 14:21:22 -0400 (Thu, 12 Jul 2007) | 3 lines

  Initialized merge tracking via "svnmerge" with revisions "1003" from
  svn://svn.open-ils.org/OpenSRF/branches/new-json2
........
  r1030 | miker | 2007-07-12 23:15:51 -0400 (Thu, 12 Jul 2007) | 46 lines

  Patch from Scott McKellar, with modifications, to remove unused code and provide some memory protection:

  This patch contains one minor change and one less minor change.

  --------

  The less minor change is the elimination of some old code that once
  opened a pipe to send commands to bash.  According to Bill Erickson
  in a private email, that code is a leftover remnant from an
  experiment and may be removed.

  Before a patch was applied several days ago, things worked like this:
  IF you compiled srfsh with a certain macro #defined, AND you entered
  a command that was invalid to srfsh, THEN srfsh would pipe the
  command to bash for execution.

  It is doubtful that anyone but Bill ever used this variation, but if
  anyone wants to keep it around, then this is his or her chance to
  protest.  Before protesting, however, please note that the shell
  escape mechanism now provides shell-like command processing.  I.e.
  if you start the srfsh command line with an exclamation point, srfsh
  passes the rest of the command to the default shell (normally
  /bin/sh) for execution.  The command so passed can use environmental
  variables, pipes, IO redirection, wild card expansion, and most of
  the sorts of things you're used to from the shell command line.

  Note that not all shells behave the same.  If you're used to using
  tcsh as your shell, for example, you may find that sh won't work
  quite the same way.  For now, at least, that's just too bad, but
  that's the way shell escapes typically work.

  It is probably possible to invoke the user's default shell as
  identified by the environmental variable $SHELL.  However that
  nicety would not be trivial to code.

  ----------

  The minor change is that, after building an array of pointers
  pointing to tokens from the input command, I set the next
  pointer to NULL so that it mark the end of the token list.

  (miker: I changed to calloc/free instead of an array, but left the final
  NULL in place.)
........
  r1031 | miker | 2007-07-13 10:52:20 -0400 (Fri, 13 Jul 2007) | 1 line

  changing back to an array, from calloc.  more straight-forward, and avoids memset overhead
........

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/new-json2@1032 9efc2488-bf62-4759-914b-345cdb29e865
src/srfsh/srfsh.c