Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, December 2, 2026

Diff for scripts/ep/pipe-test.c between version 1.1 and 1.2

version 1.1, 2001/12/13 17:33:41 version 1.2, 2001/12/16 20:44:38
Line 29  int main(int argc, char **argv)
Line 29  int main(int argc, char **argv)
         }          }
   
         if (pipe(pipe0)          if (pipe(pipe0)
                                                         || pipe(pipe1)                          || pipe(pipe1)
                                                         || pipe(pipe2)) {                          || pipe(pipe2)) {
                 puts("pipe() failure");                  puts("pipe() failure");
                 return 1;                  return 1;
         }          }
Line 38  int main(int argc, char **argv)
Line 38  int main(int argc, char **argv)
         /*          /*
            fcntl(pipe1[1], F_SETFL, O_NONBLOCK|O_NDELAY);             fcntl(pipe1[1], F_SETFL, O_NONBLOCK|O_NDELAY);
            fcntl(pipe2[1], F_SETFL, O_NONBLOCK|O_NDELAY);             fcntl(pipe2[1], F_SETFL, O_NONBLOCK|O_NDELAY);
            */  
   
         sh_unset_nodelay_mode(0);          sh_unset_nodelay_mode(0);
         sh_unset_nodelay_mode(pipe1[1]);          sh_unset_nodelay_mode(pipe1[1]);
         sh_unset_nodelay_mode(pipe1[2]);          sh_unset_nodelay_mode(pipe1[2]);
            */
   
         switch (pid = fork()) {          switch (pid = fork()) {
                 case -1:                  case -1:
Line 52  int main(int argc, char **argv)
Line 52  int main(int argc, char **argv)
   
                 case 0: /* Child */                  case 0: /* Child */
                         if (dup2(pipe0[0], 0) == -1                          if (dup2(pipe0[0], 0) == -1
                                                                         || dup2(pipe1[1], 1) == -1                                          || dup2(pipe1[1], 1) == -1
                                                                         || dup2(pipe2[1], 2) == -1) {                                          || dup2(pipe2[1], 2) == -1) {
                                 puts("dup2() failure");                                  puts("dup2() failure");
                                 return 1;                                  return 1;
                         }                          }
Line 175  int give_terminal_to (pid_t pgrp, int sh
Line 175  int give_terminal_to (pid_t pgrp, int sh
                         /* Maybe we should print an error message? */                          /* Maybe we should print an error message? */
 #if 0  #if 0
                         sys_error ("tcsetpgrp(%d) failed: pid %ld to pgrp %ld",                          sys_error ("tcsetpgrp(%d) failed: pid %ld to pgrp %ld",
                                                                         shell_tty, (long)getpid(), (long)pgrp);                                          shell_tty, (long)getpid(), (long)pgrp);
 #endif  #endif
                         r = -1;                          r = -1;
                 }                  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top