Hacker News new | ask | show | jobs
by omphaloskeptic 660 days ago
Also, on POSIX systems, exec-ing a program with argv[0] starting with ‘-‘ will have it start as a login shell, which is a whole rabbit hole of its own. I’m sure it’s within the security model (and the linked article doesn’t really discuss the concept of OS security models), but it’s still a pretty big shift in behaviour just from adding a character to the argv[0] value
1 comments

No, that’s a property of how shells interpret argv[0], not a property of exec()