Hands-On-Network-Programming-with-C icon indicating copy to clipboard operation
Hands-On-Network-Programming-with-C copied to clipboard

Handle program exit consistently

Open Filkolev opened this issue 10 months ago • 0 comments

Handle error conditions uniformly by following these rules:

  • return 0 on success and 1 on failure
  • when an error occurs in main() use return
  • when an error occurs in a function other than main() use exit()
  • error messages are printed on stderr

Filkolev avatar Dec 03 '24 03:12 Filkolev