Comments (2)
It was correctly copied, and it is used, but the usage isn't readily apparent. The declaration of argv0
as a global is in libc.h
(https://github.com/0intro/plan9/blob/master/sys/include/libc.h#L718), and sysfatal
makes use of it for its error message. Other programs in Plan 9 use it in place of argv[0]
for scope convenience, and it often gets assigned like argv0 = argv[0]
. (Just a WAG, but I'd speculate that having it as a global also helps with identifying random core files.) There is some slightly more involved usage of argv0
(e.g., https://github.com/0intro/plan9/blob/master/sys/src/cmd/aux/usage.c) but it's usually just set at the beginning and then not explicitly used.
I don't have the exact history handy (you might want to try 9fans) but it doesn't seem to appear in the fabled (and only recently released) Unix Research Version 10 libc (https://www.tuhs.org/Archive/Distributions/Research/Dan_Cross_v10/ has tarballs), though there's some usage of argv0
resembling Plan 9's usage in the interactive SCSI shell for the WORM system.
If you aren't able to check out the source code, you can find it in @0intro's Plan 9 repo here: https://github.com/0intro/plan9/blob/master/sys/src/cmd/cat.c. The 9front version (http://code.9front.org/hg/plan9front/file/8ae76288951f/sys/src/cmd/cat.c) and the P9P version (https://9fans.github.io/usr/local/plan9/src/cmd/) are identical.
from cats.
Ah, okay. Just seemed odd but your explanation makes it less strange. Thanks.
from cats.
Related Issues (2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cats.