Commit graph

5 commits

Author SHA1 Message Date
Laslo Hunhold
72aa1646f6 If fork fails, close the incoming socket 2018-02-23 22:40:47 +01:00
Laslo Hunhold
53c3963497 Actually exit the child process once finished serving
Thanks Rodrigo S. Cañibano for noticing this!
2018-02-23 22:29:00 +01:00
Laslo Hunhold
f6f98c9e64 Remove server-architecture specifics from serve() and add them to main()
To make the code a bit more flexible, let's get rid of the forking-code
in serve() and do it in main(). This way, we are more liberal in the
future to possibly handle it in a different way.
2018-02-05 17:15:29 +01:00
Laslo Hunhold
33d3d85f4f Refine error messages
I forgot that they can fail with errno = 0, which indicates that the
given entry was not found.
2018-02-04 21:40:51 +01:00
Laslo Hunhold
ccdb51b96d Refactor the single source file into multiple modules
And many other things, too many to list here. For example, it now
properly logs uds instead of erroring out.
Separating concerns in many places definitely improves the readability.
2018-02-04 21:27:33 +01:00