3 ms·
There is also a neat little BSD extension, also supported on a number of other Unix-like systems and GNU userspace (i.e. glibc, but also other libcs like Musl):
by st_goliath 2y ago
There is also a neat little BSD extension, also supported on a number of other Unix-like systems and GNU userspace (i.e. glibc, but also other libcs like Musl):
extern char *__progname;
which holds the program name without the (optional) invocation path in front of it. Basically the last path component of argv[0].
- dotancohen 2y agoNice, thank you.
- Brian_K_White 2y agowattttt? nice thank you