Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why are there multiple main() functions? I've never seen this style before. Is it multi-process?


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.


There are multiple main() functions because there are multiple programs! Check out https://github.com/git/git/commit/e83c5163316f89bfbde7d9ab23...


Look at the makefile, it just has a command line program for each basic operation.


Could just be initializers for different modules maybe?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: