http_main.cc 383 B

123456789101112131415161718192021
  1. #include <config.h>
  2. #include <apt-pkg/fileutl.h>
  3. #include <apt-pkg/error.h>
  4. #include <signal.h>
  5. #include "http.h"
  6. int main()
  7. {
  8. setlocale(LC_ALL, "");
  9. // ignore SIGPIPE, this can happen on write() if the socket
  10. // closes the connection (this is dealt with via ServerDie())
  11. signal(SIGPIPE, SIG_IGN);
  12. HttpMethod Mth;
  13. Mth.DropPrivsOrDie();
  14. return Mth.Loop();
  15. }