Changeset 481 for trunk/src/sh_sub.c


Ignore:
Timestamp:
Jul 18, 2015, 5:06:52 PM (6 years ago)
Author:
katerina
Message:

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_sub.c

    r429 r481  
    8383      close (child2parent[0]);
    8484
    85       /* fprintf(stderr, "FIXME kill_sub %d\n", (int) sh_child_pid); */
    86 
    8785      /* Let's be rude. */
    8886      kill(sh_child_pid, SIGKILL);
     
    210208
    211209          sh_child_pid = res;
    212 
    213           /* fprintf(stderr, "FIXME create_sub %d\n", (int) sh_child_pid); */
    214210        }
    215211      else
     
    252248static ssize_t sh_sub_write(int fd, const void *buf, size_t count)
    253249{
    254   char * mbuf = (char *) buf;
     250  const char * mbuf = (const char *) buf;
    255251  ssize_t rcount;
    256252  int ttl = 5; /* 0, 1, 9, 81, 729 millisec */
     
    296292  do {
    297293
    298     /* fprintf(stderr, "FIXME wait_com polling..\n"); */
    299 
    300294    do {
    301295      ret = poll(&fds, 1, -1);
     
    305299      {
    306300        ret = sh_sub_read(parent2child[0], &inbuf, sizeof(inbuf));
    307 
    308         /*
    309         fprintf(stderr, "FIXME wait_com stat %s (%s)\n",
    310                 inbuf.path, (inbuf.command == SH_COM_LSTAT) ? "lstat" : "stat");
    311         */
    312301
    313302        if (ret == 0)
     
    328317            outbuf.errnum = errno;
    329318
    330             /* fprintf(stderr, "FIXME wait_com writing..\n"); */
    331 
    332319            ret = sh_sub_write(child2parent[1], &outbuf, sizeof(outbuf));
    333320            if (ret < 0)
    334321              {
    335                 /* fprintf(stderr, "FIXME wait_com return 1\n"); */
    336322                return;
    337323              }
     
    339325        else /* sh_sub_read() < 0 */
    340326          {
    341             /* fprintf(stderr, "FIXME wait_com return 2\n"); */
    342327            return;
    343328          }
    344329      }
    345    
    346     /* fprintf(stderr, "FIXME wait_com next..\n"); */
    347 
    348330  } while (1 == 1);
    349331}
Note: See TracChangeset for help on using the changeset viewer.