You're looking at the wrong file. Setting argv[0] doesn't update /proc/self/comm, it updates /proc/self/cmdline.
demo.c:
#include <unistd.h>
#include <string.h>
int main(int argc, char *argv[]) {
strcpy(argv[0], "frob");
sleep(100);
}
Terminal 1: $ make demo
cc demo.c -o demo
$ ./demo --greppable
Terminal 2: $ ps aux|grep greppable
luke 25858 0.0 0.0 2164 752 pts/0 S+ 00:32 0:00 frob o --greppable
luke 25931 0.0 0.0 8192 2356 pts/5 S+ 00:32 0:00 grep --color=auto greppable
$ cat -v /proc/25858/cmdline
frob^@o^@--greppable^@$
Re:Bash 5.0 released
by chrisseaton on Tuesday January 08, 2019 @12:41AM
(#18853501)
$ ruby -e "\$0 = 'im not lying to you'; sleep"
$ ps
EDIT: formatting.
EDIT2: I stand corrected, see willglynn's comment.