Re:Implementations of Cat(1) from Various Sources (2018)
by ygra on Sunday January 19, 2020 @02:08AM
(#22089918)
https://github.com/brho/plan9/blob/89d43d2262ad43eb4b26c2a8d... seems to be a global variable.
https://9fans.github.io/plan9port/man/man3/arg.html also references it.
[ Parent
| on HN ]
Re:Implementations of Cat(1) from Various Sources (2018)
by henesy on Sunday January 19, 2020 @02:32AM
(#22089996)
Used by sysfatal(2):
https://github.com/0intro/plan9-contrib/blob/master/sys/src/...
Also mentioned in sysfatal(2)'s manual:
Re:Implementations of Cat(1) from Various Sources (2018)
by Someone on Sunday January 19, 2020 @11:09AM
(#22092104)
Also used in the beautiful (for those who like being creative with the preprocessor) options parser https://9fans.github.io/plan9port/man/man3/arg.html
Re:Implementations of Cat(1) from Various Sources (2018)
by g82918 on Sunday January 19, 2020 @03:24AM
(#22090174)
Thank you, that bit was very interesting. I like the idea for single threaded applications of having argv0 be a global.
Re:Implementations of Cat(1) from Various Sources (2018)
by sherincall on Sunday January 19, 2020 @07:04AM
(#22090945)
Doesn't have to be single-threaded even. Main writes the pointer at the start, and no one else is going to change it, just read from it.