mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

113 lines
2.9 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/base/pdksh/pdksh-5.2.14-2.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. [ ftp://ftp.cs.mun.ca/pub/pdksh/pdksh-5.2.14-patches.2 ]
  23. --- ./exec.c.a Mon Jan 29 10:02:13 2001
  24. +++ ./exec.c Mon Jan 29 10:06:57 2001
  25. @@ -76,6 +76,7 @@
  26. {
  27. int i;
  28. volatile int rv = 0;
  29. + volatile int rv_prop = 0; /* rv being propogated or newly generated? */
  30. int pv[2];
  31. char ** volatile ap;
  32. char *s, *cp;
  33. @@ -157,6 +158,7 @@
  34. case TPAREN:
  35. rv = execute(t->left, flags|XFORK);
  36. + rv_prop = 1;
  37. break;
  38. case TPIPE:
  39. @@ -275,6 +277,7 @@
  40. rv = execute(t->right, flags & XERROK);
  41. else
  42. flags |= XERROK;
  43. + rv_prop = 1;
  44. break;
  45. case TBANG:
  46. @@ -323,6 +326,7 @@
  47. }
  48. }
  49. rv = 0; /* in case of a continue */
  50. + rv_prop = 1;
  51. if (t->type == TFOR) {
  52. while (*ap != NULL) {
  53. setstr(global(t->str), *ap++, KSH_SS_UNWIND_ERROR);
  54. @@ -334,6 +338,7 @@
  55. for (;;) {
  56. if (!(cp = do_selectargs(ap, is_first))) {
  57. rv = 1;
  58. + rv_prop = 0;
  59. break;
  60. }
  61. is_first = FALSE;
  62. @@ -365,6 +370,7 @@
  63. rv = 0; /* in case of a continue */
  64. while ((execute(t->left, XERROK) == 0) == (t->type == TWHILE))
  65. rv = execute(t->right, flags & XERROK);
  66. + rv_prop = 1;
  67. break;
  68. case TIF:
  69. @@ -374,6 +380,7 @@
  70. rv = execute(t->left, XERROK) == 0 ?
  71. execute(t->right->left, flags & XERROK) :
  72. execute(t->right->right, flags & XERROK);
  73. + rv_prop = 1;
  74. break;
  75. case TCASE:
  76. @@ -386,10 +393,12 @@
  77. break;
  78. Found:
  79. rv = execute(t->left, flags & XERROK);
  80. + rv_prop = 1;
  81. break;
  82. case TBRACE:
  83. rv = execute(t->left, flags & XERROK);
  84. + rv_prop = 1;
  85. break;
  86. case TFUNCT:
  87. @@ -401,6 +410,7 @@
  88. * (allows "ls -l | time grep foo").
  89. */
  90. rv = timex(t, flags & ~XEXEC);
  91. + rv_prop = 1;
  92. break;
  93. case TEXEC: /* an eval'd TCOM */
  94. @@ -428,7 +438,7 @@
  95. quitenv(); /* restores IO */
  96. if ((flags&XEXEC))
  97. unwind(LEXIT); /* exit child */
  98. - if (rv != 0 && !(flags & XERROK)) {
  99. + if (rv != 0 && !rv_prop && !(flags & XERROK)) {
  100. if (Flag(FERREXIT))
  101. unwind(LERROR);
  102. trapsig(SIGERR_);