network programming - C http server stops after unpredictable time -


i writing custom http server in c openwrt router. makes use of uclibc library. using 1 static buffer careful not overflow, , no multi-threading involved. doesn't contain complex data structures, , that:

  • it listen() s on socket
  • reads request after accept() ing
  • gets html page sending http request predefined remote server (not proxy)
  • sends result through accepted connection, , closes both.

the program stop running after time, (it can on receiving first request, or after working under heavy strain more 2 hours). getting no error messages through console, or anything, program stops. have watched and, expected doesn't consume more , more memory runs...

  • is possible kernel stops if thinks abusing cpu? how overcome that?
  • are there quirks watch in socket programming in c known cause such crashes?
  • can stability issues caused using barrier bracker (bleeding edge) branch of openwrt? although router never stops working...

where start source of problem?

ok, first, thank helping. after writing lot of netcat testers, have pinpointed problem. program crash - end without single error message, if connection closed client before last write or read occurs. write or read raise sigpipe signal default crashed program if not handled manually... more info here: how prevent sigpipe or prevent server ending?


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -