Magellan Linux

Diff of /trunk/mkinitrd-magellan/klibc/usr/dash/eval.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 814 by niro, Sat Sep 1 22:45:15 2007 UTC revision 815 by niro, Fri Apr 24 18:32:46 2009 UTC
# Line 150  evalcmd(int argc, char **argv) Line 150  evalcmd(int argc, char **argv)
150                          STPUTC('\0', concat);                          STPUTC('\0', concat);
151                          p = grabstackstr(concat);                          p = grabstackstr(concat);
152                  }                  }
153                  evalstring(p, ~SKIPEVAL);                  return evalstring(p, ~SKIPEVAL);
   
154          }          }
155          return exitstatus;          return 0;
156  }  }
157    
158    
# Line 166  evalstring(char *s, int mask) Line 165  evalstring(char *s, int mask)
165  {  {
166   union node *n;   union node *n;
167   struct stackmark smark;   struct stackmark smark;
168   int skip;   int status;
169    
170   setinputstring(s);   setinputstring(s);
171   setstackmark(&smark);   setstackmark(&smark);
172    
173   skip = 0;   status = 0;
174   while ((n = parsecmd(0)) != NEOF) {   while ((n = parsecmd(0)) != NEOF) {
175   evaltree(n, 0);   evaltree(n, 0);
176     status = exitstatus;
177   popstackmark(&smark);   popstackmark(&smark);
178   skip = evalskip;   if (evalskip)
  if (skip)  
179   break;   break;
180   }   }
181   popfile();   popfile();
182    
183   skip &= mask;   evalskip &= mask;
184   evalskip = skip;   return status;
  return skip;  
185  }  }
186    
187    
# Line 627  evalbackcmd(union node *n, struct backcm Line 625  evalbackcmd(union node *n, struct backcm
625   FORCEINTON;   FORCEINTON;
626   close(pip[0]);   close(pip[0]);
627   if (pip[1] != 1) {   if (pip[1] != 1) {
628   close(1);   dup2(pip[1], 1);
  copyfd(pip[1], 1);  
629   close(pip[1]);   close(pip[1]);
630   }   }
631   eflag = 0;   eflag = 0;

Legend:
Removed from v.814  
changed lines
  Added in v.815