[BACK]Return to usbhidaction.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / usbhidaction

Diff for /src/usr.bin/usbhidaction/usbhidaction.c between version 1.14 and 1.15

version 1.14, 2010/06/29 17:16:35 version 1.15, 2011/03/07 14:59:06
Line 46 
Line 46 
 #include <util.h>  #include <util.h>
 #include <syslog.h>  #include <syslog.h>
 #include <signal.h>  #include <signal.h>
   #include <paths.h>
   
 int verbose = 0;  int verbose = 0;
 int isdemon = 0;  int isdemon = 0;
Line 399 
Line 400 
         char cmdbuf[SIZE], *p, *q;          char cmdbuf[SIZE], *p, *q;
         size_t len;          size_t len;
         int n, r;          int n, r;
           pid_t pid;
   
         if (cmd->action == NULL) {          if (cmd->action == NULL) {
                 if (verbose)                  if (verbose)
Line 437 
Line 439 
         }          }
         *q = 0;          *q = 0;
   
         if (verbose)          pid = fork();
                 printf("system '%s'\n", cmdbuf);          if (pid == -1)
         r = system(cmdbuf);                  warn("fork failed");
         if (verbose > 1 && r)          else if (pid == 0) {
                 printf("return code = 0x%x\n", r);                  setpgid(0, 0);
                   if (verbose)
                           printf("executing '%s'\n", cmdbuf);
                   r = execl(_PATH_BSHELL, "sh", "-c", cmdbuf, NULL);
                   err(1, "execl");
           }
 }  }
   
 void  void

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15