> ++    if (pledge("stdio rpath wpath cpath fattr", NULL) == -1)
> ++            perror("pledge");

perror(3) only prints the error message; you also need to exit(3)
explicitly:

        if (pledge("stdio rpath wpath cpath fattr", NULL) == -1) {
                perror("pledge");
                exit(1);
        }

Reply via email to