Yelp/dumb-init

Failed exec produces misleading error message when passing flags

Closed this issue · 0 comments

(venv) ckuehl@dementors:~/test$ dumb-init -- doesnotexist
[dumb-init] --: No such file or directory

It's because we still print argv[1], which is a remnant from the days where dumb-init did no argument parsing (except to read the program to execute):

        // if this point is reached, exec failed, so we should exit nonzero
        PRINTERR("%s: %s\n", argv[1], strerror(errno));
        return 2;