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/proctable.c between version 1.20 and 1.21

version 1.20, 2002/04/11 00:04:27 version 1.21, 2002/04/11 06:43:11
Line 25 
Line 25 
 #include <fcntl.h>  #include <fcntl.h>
 #include <signal.h>  #include <signal.h>
 #include <sys/stat.h> /* S_IFCHR */  #include <sys/stat.h> /* S_IFCHR */
   /* #include <sys/time.h> PRIO_PROCESS */
   #include <sys/resource.h> /* PRIO_PROCESS */
   
 #include <cfg/str/strdyn.h>  #include <cfg/str/strdyn.h>
   
Line 83  proctable_destroy(p_ptbl)
Line 85  proctable_destroy(p_ptbl)
                 register int i;                  register int i;
   
                 /* TODO:                  /* TODO:
                  * Here was written *p_ptbl[i] insted (*p_ptbl)[i] on several places.                   * Here was written *p_ptbl[i] instead (*p_ptbl)[i] on several places.
                  * I supposed that it is the same. LEARN OPERATOR PRIORITIES ASAP!!                   * I supposed that it is the same. LEARN OPERATOR PRIORITIES ASAP!!
                  * -- Nepto [2/12/2001]                   * -- Nepto [2/12/2001]
                  */                   */
Line 314  proctable_create_pipes(ptbl)
Line 316  proctable_create_pipes(ptbl)
   
                                         if (pipe(ptbl[i]->fd[k].pipe) < 0) {                                          if (pipe(ptbl[i]->fd[k].pipe) < 0) {
 #if DEBUG  #if DEBUG
                                                 msg_print("\n");                                                  msg_print(" - failed\n");
 #endif  #endif
                                                 return -1;                                                  return -1;
                                         }                                          }
Line 466  proctable_remove_process(p_ptbl, proc_id
Line 468  proctable_remove_process(p_ptbl, proc_id
                         for (j = 0; j < (*p_ptbl)[i]->fd[k].n_link; /* empty */) {                          for (j = 0; j < (*p_ptbl)[i]->fd[k].n_link; /* empty */) {
   
                                 if ((*p_ptbl)[i]->fd[k].link[j].proc_id == proc_id) {                                  if ((*p_ptbl)[i]->fd[k].link[j].proc_id == proc_id) {
                                           /* This removing stuff was moved to begin of function. */
                                         /* fd_remove_proclink_by_index(&(*p_ptbl)[i]->fd[k], j); */                                          /* fd_remove_proclink_by_index(&(*p_ptbl)[i]->fd[k], j); */
                                 }                                  }
                                 else {                                  else {
Line 516  proctable_remove_process_fd_links(ptbl,
Line 519  proctable_remove_process_fd_links(ptbl,
                 register int a_proc_id, a_fd_id;                  register int a_proc_id, a_fd_id;
   
                 /* 0 means the first proclink;                  /* 0 means the first proclink;
                    we want remove them all */                     we want remove them all continuosly */
                 a_proc_id = ptbl[proc_id]->fd[fd_id].link[0].proc_id;                  a_proc_id = ptbl[proc_id]->fd[fd_id].link[0].proc_id;
                 a_fd_id   = ptbl[proc_id]->fd[fd_id].link[0].fd_id;                  a_fd_id   = ptbl[proc_id]->fd[fd_id].link[0].fd_id;
   
Line 621  proctable_read(p_ptbl, p_rfds, p_wfds, p
Line 624  proctable_read(p_ptbl, p_rfds, p_wfds, p
                                 }                                  }
   
                                 if (datasize == 0) {                                  if (datasize == 0) {
                                         /* Variable datasize is 0, we are going to remove                                          /* Variable datasize is 0, filedescriptor is closed.
                                            all proclinks from/to this filedescriptor. */                                             Now we are going to remove all proclinks from/to this
                                              filedescriptor. */
   
                                         proctable_remove_process_fd_links(*p_ptbl, i, k);                                          proctable_remove_process_fd_links(*p_ptbl, i, k);
   
                                 }                                  }
                                 else {                                  else {
                                         /* Variable datasize is not 0, we are going to                                          /* Variable datasize is not 0. Data were recieved.
                                            transfer datasize bytes to linked filedescriptors. */                                             We are going to transfer datasize bytes to linked
                                              filedescriptors. */
   
                                         for (j = 0; j < (*p_ptbl)[i]->fd[k].n_link; j++) {                                          for (j = 0; j < (*p_ptbl)[i]->fd[k].n_link; j++) {
                                                 register int proc_id, fd_id;                                                  register int proc_id, fd_id;
Line 883  proctable_wait2(p_ptbl)
Line 888  proctable_wait2(p_ptbl)
   
         return 0;          return 0;
 }  }
   

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

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