Y
Hacker News
new
|
ask
|
show
|
jobs
by
zabcik
4222 days ago
Why are there multiple main() functions? I've never seen this style before. Is it multi-process?
4 comments
GauntletWizard
4222 days 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.
link
Svenstaro
4222 days ago
There are multiple main() functions because there are multiple programs! Check out
https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23...
link
andrewchambers
4222 days ago
Look at the makefile, it just has a command line program for each basic operation.
link
taurath
4222 days ago
Could just be initializers for different modules maybe?
link