Fix warnings 'implicit-fallthrough' of gcc 7
[src/app-framework-main.git] / src / afm-launch.c
index bb528e5..1a354a1 100644 (file)
@@ -610,6 +610,7 @@ static union arguments instantiate_arguments(
                                                break;
                                        case '%':
                                                c = 0;
+                                               /*@fallthrough@*/
                                        default:
                                                mini[1] = c;
                                                v = mini;
@@ -731,6 +732,9 @@ static pid_t launch(
 
        close(rpipe[0]);
 
+       /* set name by appid */
+       verbose_set_name(desc->appid, 0);
+
        /* avoid set-gid effect */
        setresgid(groupid, groupid, groupid);
 
@@ -768,6 +772,7 @@ static pid_t launch(
 
        /* executes the process */
        rc = execve(args[0], args, env);
+       access(args[0], X_OK);
        ERROR("failed to exec master %s: %m", args[0]);
        _exit(1);
        return -1;