Diff for /libelwix/src/pio.c between versions 1.1.2.5 and 1.1.2.6

version 1.1.2.5, 2013/12/05 15:38:48 version 1.1.2.6, 2013/12/06 00:19:54
Line 88  e_popen(const char *command, const char *type, pid_t * Line 88  e_popen(const char *command, const char *type, pid_t *
                     (type[1] && (type[1] != 'e' || type[2])))                      (type[1] && (type[1] != 'e' || type[2])))
                         return (NULL);                          return (NULL);
         }          }
        if ((cloexec ? pipe2(pdes, O_CLOEXEC) : pipe(pdes)) < 0)        if (socketpair(AF_UNIX, SOCK_STREAM | (cloexec ? O_CLOEXEC : 0), 
                                 0, pdes) < 0) {
                 LOGERR;
                 return (NULL);                  return (NULL);
           }
   
         if (!(cur = e_malloc(sizeof(struct tagPIOPID)))) {          if (!(cur = e_malloc(sizeof(struct tagPIOPID)))) {
                 close(pdes[0]);                  close(pdes[0]);
Line 99  e_popen(const char *command, const char *type, pid_t * Line 102  e_popen(const char *command, const char *type, pid_t *
   
         argv[0] = "sh";          argv[0] = "sh";
         argv[1] = "-c";          argv[1] = "-c";
        argv[2] = (char *)command;        argv[2] = (char *) command;
         argv[3] = NULL;          argv[3] = NULL;
   
         THREAD_LOCK();          THREAD_LOCK();
         switch (pid = vfork()) {          switch (pid = vfork()) {
         case -1:                        /* Error. */          case -1:                        /* Error. */
                   LOGERR;
                 THREAD_UNLOCK();                  THREAD_UNLOCK();
                 close(pdes[0]);                  close(pdes[0]);
                 close(pdes[1]);                  close(pdes[1]);

Removed from v.1.1.2.5  
changed lines
  Added in v.1.1.2.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>