]> Dogcows Code - chaz/tint2/blobdiff - src/launcher/launcher.c
fixed memleak
[chaz/tint2] / src / launcher / launcher.c
index 55c120ef342ac17f63622edf355f40196748cf46..618efa279e6603650d64eae13c7c00ce06cdf057 100644 (file)
@@ -251,18 +251,7 @@ void launcher_action(LauncherIcon *icon)
 {
        char *cmd = malloc(strlen(icon->cmd) + 10);
        sprintf(cmd, "(%s&)", icon->cmd);
-       if (cmd) {
-               pid_t pid;
-               pid = fork();
-               if (pid == 0) {
-                       // change for the fork the signal mask
-                       //                      sigset_t sigset;
-                       //                      sigprocmask(SIG_SETMASK, &sigset, 0);
-                       //                      sigprocmask(SIG_UNBLOCK, &sigset, 0);
-                       // exec
-                       execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
-                       _exit(0);
-               }
-       }
+       tint_exec(cmd);
+       free(cmd);
 }
 
This page took 0.02085 seconds and 4 git commands to generate.