[BACK]Return to bc.y CVS log [TXT][DIR] Up to [local] / src / usr.bin / bc

Diff for /src/usr.bin/bc/bc.y between version 1.38 and 1.39

version 1.38, 2011/07/08 23:29:46 version 1.39, 2011/08/03 08:48:19
Line 43 
Line 43 
 #include <stdarg.h>  #include <stdarg.h>
 #include <stdbool.h>  #include <stdbool.h>
 #include <string.h>  #include <string.h>
   #include <termios.h>
 #include <unistd.h>  #include <unistd.h>
   
 #include "extern.h"  #include "extern.h"
Line 1061 
Line 1062 
         int status, save_errno = errno;          int status, save_errno = errno;
   
         for (;;) {          for (;;) {
                 pid = waitpid(dc, &status, WCONTINUED);                  pid = waitpid(dc, &status, WCONTINUED | WNOHANG);
                 if (pid == -1) {                  if (pid == -1) {
                         if (errno == EINTR)                          if (errno == EINTR)
                                 continue;                                  continue;
                         _exit(0);                          _exit(0);
                 }                  } else if (pid == 0)
                           break;
                 if (WIFEXITED(status) || WIFSIGNALED(status))                  if (WIFEXITED(status) || WIFSIGNALED(status))
                         _exit(0);                          _exit(0);
                 else                  else
Line 1139 
Line 1141 
                         close(p[0]);                          close(p[0]);
                         close(p[1]);                          close(p[1]);
                         if (interactive) {                          if (interactive) {
                                   gettty(&ttysaved);
                                 el = el_init("bc", stdin, stderr, stderr);                                  el = el_init("bc", stdin, stderr, stderr);
                                 hist = history_init();                                  hist = history_init();
                                 history(hist, &he, H_SETSIZE, 100);                                  history(hist, &he, H_SETSIZE, 100);

Legend:
Removed from v.1.38  
changed lines
  Added in v.1.39