Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
zabcik
· 12y ago · 0 comments
Why are there multiple main() functions? I've never seen this style before. Is it multi-process?
Comments
[–]
GauntletWizard
12y ago
There's a bunch of different utilities in there. Each has it's own main() function, and they're compiled into a bunch of binaries.
[–]
Svenstaro
12y ago
There are multiple main() functions because there are multiple programs! Check out
https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23...
[–]
andrewchambers
12y ago
Look at the makefile, it just has a command line program for each basic operation.
[–]
taurath
12y ago
Could just be initializers for different modules maybe?