Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for ep/src/main.c between version 1.25 and 1.26

version 1.25, 2002/04/15 17:56:56 version 1.26, 2002/05/27 16:46:19
Line 242  main(argc, argv)
Line 242  main(argc, argv)
   
                 /* TODO: if closed fd 0, always use timeout */                  /* TODO: if closed fd 0, always use timeout */
                 if (pid == 1) {                  if (pid == 1) {
                         tv.tv_sec = 0;                          tv.tv_sec  = 0;
                         tv.tv_usec = 1000;                          tv.tv_usec = 1000;
                 }                  }
   
Line 266  main(argc, argv)
Line 266  main(argc, argv)
                         int c;                          int c;
                         c = getch();                          c = getch();
                         switch (c) {                          switch (c) {
                                 case '\033': /* ESC */                                  case '\033':                            /* ESC */
                                 case KEY_F(9):                                  case KEY_F(9):                          /* F9  */
                                         menu_main(&ptbl);                                          menu_main(&ptbl);
                                         touchwin(stdscr);                                          touchwin(stdscr);
                                         refresh();                                          refresh();
                                         break;                                          break;
                                 case 12: /* ^L */                                  case 12:                                        /* ^l */
                                         touchwin(stdscr);                                          touchwin(stdscr);
                                         refresh();                                          refresh();
                                         break;                                          break;
Line 301  main(argc, argv)
Line 301  main(argc, argv)
   
                 while (1) {                  while (1) {
                         pid = proctable_wait2(&ptbl);                          pid = proctable_wait2(&ptbl);
                         /* printf("pid = %d\n", pid); */                          /* printf("pid = %d\n", pid);sleep(1); */
   
                         if (pid < 0) {                          if (pid < 0) {
                                 msg_error_print("waitpid() failure: %s\n", strerror(errno));                                  msg_error_print("waitpid() failure: %s\n", strerror(errno));
Line 309  main(argc, argv)
Line 309  main(argc, argv)
                         }                          }
   
                         size = proctable_get_size(ptbl);                          size = proctable_get_size(ptbl);
                           /* printf("size = %d\n", size);sleep(1); */
                         if (size < 2 /* and 0 is closed */) {                          if (size < 2 /* and 0 is closed */) {
                                 pid = -1;                                  pid = -1;
                                 break;                                  break;
Line 327  main(argc, argv)
Line 328  main(argc, argv)
                 if (pid < 0)                  if (pid < 0)
                         break;                          break;
   
           } /* while (1) */
 #if DEBUG  
                 proctable_print(ptbl);  
 #endif  
         }  
   
         /*          /*
          * Destroying used process table.           * Destroying used process table.
Line 339  main(argc, argv)
Line 336  main(argc, argv)
   
         proctable_destroy(&ptbl);          proctable_destroy(&ptbl);
   
         return errno > 0 ? errno : (errno < 0 ? -errno : 0);          return errno == 0 ? 0 : (errno < 0 ? -errno : errno);
 }  }
   

Legend:
Removed from v.1.25  
changed lines
  Added in v.1.26

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