]> git.saurik.com Git - apt.git/blame - methods/http_main.cc
DropPrivs: Move the re-set uid/gid thing to the end of the function
[apt.git] / methods / http_main.cc
CommitLineData
ea542140 1#include <config.h>
3927c6da 2#include <apt-pkg/fileutl.h>
217d575b 3#include <signal.h>
5f6b130d 4
5f6b130d
MV
5#include "http.h"
6
5f6b130d
MV
7int main()
8{
9 setlocale(LC_ALL, "");
10
217d575b
MV
11 // ignore SIGPIPE, this can happen on write() if the socket
12 // closes the connection (this is dealt with via ServerDie())
13 signal(SIGPIPE, SIG_IGN);
14
5f6b130d 15 HttpMethod Mth;
7b18d559
JAK
16
17 Mth.DropPrivsOrDie();
5f6b130d
MV
18 return Mth.Loop();
19}