home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume30 / rc / part05 / CHANGES next >
Encoding:
Text File  |  1992-05-30  |  5.5 KB  |  172 lines

  1. Changes since 1.2: (Too many to count!)
  2.  
  3. A memory stomping bug was fixed (provoked by assigning a variable
  4. to its old value plus something else).
  5.  
  6. Better signal handling; a real signal handler which manages a queue
  7. of pending signals was added.
  8.  
  9. rc now ignores SIGQUIT and traps SIGINT even in non-interactive
  10. mode. Thus,
  11.  
  12.     rc ed.sh
  13.  
  14. will not do mysterious things if the shell script "ed.sh" calls a
  15. command like "ed" and then you hit ^C.
  16.  
  17. rc now opens 0, 1, 2 on /dev/null if they are inherited closed.
  18. rc -o prevents this.
  19.  
  20. A couple of stupid O(n^2) string appends were replaced with O(n)
  21. loops. This should make foo=`{cat /etc/termcap} bar=$^foo a little
  22. faster :-)
  23.  
  24. Returning a list of signals from a function is now legal, so "return
  25. $status" should always work.
  26.  
  27. The code has been revised, new printing routines have been added.
  28.  
  29. rc no longer uses redundant braces when exporting functions.
  30.  
  31. A first stab at a verification suite has been added (trip.rc).
  32. (someone, please help me make this comprehensive!)
  33.  
  34. rc -p now does not initialize functions from the environment. This
  35. should make it easier to write shell scripts that don't need to
  36. assume anything about the environment.
  37.  
  38. Inherited ignored signals are now ignored in the current shell and
  39. passed on ignored to the child processes. whatis -s also reflects
  40. this information.
  41.  
  42. A file descriptor leak in the /dev/fd implementation of >{} was
  43. fixed.
  44.  
  45. A variable set to '' was not imported from the environment; this
  46. has been fixed.
  47.  
  48. Changes since 1.3beta:
  49.  
  50. New Makefile/config.h setup.
  51.  
  52. builtin echo may now be conditionally included out, to use a Goldwynism.
  53.  
  54. builtin exit takes any legal exit status. If the status is not all zeros,
  55. rc exits with 1. (having "exit sigiot" produce a core dump would be going
  56. a little far, I think.)
  57.  
  58. limit does not append a unit after a zero limit; 0g was too confusing.
  59.  
  60. exec > /nonexistentfile does not cause rc to exit any more.
  61.  
  62. If a noninteractive rc is started with sigint ignored, rc does not install
  63. its own signal handler.
  64.  
  65. error messages produced by rc in a subshell were cleaned up. (rc erroneously
  66. reset the 'interactive' flag after a fork)
  67.  
  68. print.c was cleaned up a little; no functionality was changed, but should
  69. be more portable now.
  70.  
  71. a bug in rc-1.3beta (not previous versions) was fixed: setting the first
  72. element of $path to '' caused PATH to be exported as '':etc..
  73.  
  74. getopt's "illegal option" message was gratuitously changed to something
  75. less abrupt.
  76.  
  77. some dead code was removed from input.c
  78.  
  79. %term was changed to %token in parse.y; apparently newer yacc's don't grok
  80. %term any more.
  81.  
  82. a race condition in the signal handler was fixed.
  83.  
  84. the variable in for() was getting evaluated each time through the loop
  85. (e.g., for (`{echo i;date>[1=2]} in 1 2 3)echo $i would print the date
  86. three times). This was cleaned up.
  87.  
  88. a redundant fork() was removed from walk.c; this showed up when running
  89. a braced command with a redirection in the background. e.g., {a;b}>c&
  90.  
  91. man pages for history and rc were cleaned up by david (thanks).
  92.  
  93. rc set SIGQUIT and SIGTERM to SIG_DFL on background jobs---even when
  94. trying to do old-style backgrounding (i.e., don't use process groups,
  95. just ignore SIGINT & SIGQUIT & SIGTERM).
  96.  
  97. $0 is now changed to the name of the signal when entering a signal
  98. handler. Thus it's possible to write code like
  99.  
  100.     fn sigint sigterm sigquit {
  101.         switch ($0) {
  102.         case sigint
  103.             ...
  104.         case sigterm
  105.             ...
  106.  
  107. wait with no arguments now prints the pid of any and all children
  108. that died with a signal. e.g.,
  109.  
  110.     ; wait
  111.     25321: terminated
  112.     25325: terminated
  113.  
  114. as opposed to
  115.  
  116.     ; wait
  117.     terminated
  118.  
  119. An error saving/restoring state in the input stream code would
  120. cause rc to exit with the (erroneous) command:
  121.  
  122.     eval '|[a'
  123.  
  124. FIFO's were not removed in a backgrounded command, e.g.,
  125.  
  126.     cat <{echo hi}&
  127.  
  128. Changes since rc-1.4beta:
  129.  
  130. getopt was renamed to rc_getopt to avoid libc collisions.
  131.  
  132. $cdpath with a / in it caused a cd to sometimes have two //'s at the
  133. front of the path. This is reserved by POSIX, so I changed it to skip
  134. one of the /'s.
  135.  
  136. signal handling now emulates sh in the way I described in a previous
  137. message: the race condition present in older rc's whereby some SIGINTs
  138. got lost is now gone; any SIGINT received during a wait() is acted upon
  139. at the end of the wait(), unless of course SIGINT is being deliberately
  140. ignored.
  141.  
  142. getopt was renamed to avoid naming conflicts with libc. Also a sound
  143. move since rc_getopt is no longer quite libc-getopt compatible; I had
  144. to add in a mechanism for resetting getopt.
  145.  
  146. signal handler code in fn.c was cleaned up; there were several bugs
  147. in rc-1.4beta, notably the shell sometimes spawned background jobs
  148. with SIGTERM ignored. I took the opportunity to make things a little
  149. cleaner here.
  150.  
  151. a quasi-memory leak in the code for while() was fixed: a long-running
  152. while that had rc commands allocating memory in it could cause the
  153. shell to grow without bounds. I fixed this by placing the while loop
  154. (*and* test!) inside a new allocation arena each time through the loop.
  155.  
  156. A new configuration parameter, NOJOB, was added to allow you to force
  157. v7-style backgrounding (no setpgrp, ignore SIGINT and SIGTERM).
  158.  
  159. The FIFO code was reworked a little. It should be more robust now---
  160. FIFOs get removed at the end of the command of the argument list
  161. that they were on:
  162.  
  163.         fn foo {echo $*; cat $*}
  164.         foo<{echo hi}
  165.  
  166. now works as expected. Also FIFO names are pushed onto the exception
  167. stack so that their removal occurs in the face of exceptions and so
  168. on.
  169.  
  170. A memory leak in treefree() was plugged up --- the root node of a
  171. function was not getting freed.
  172.