Re-localize insock, don't manually close the socket

The OS will take care of it.
This commit is contained in:
Quentin Rameau 2017-07-24 00:59:34 +02:00 committed by Laslo Hunhold
parent 1a0eca12a5
commit 36ec9b2239

View file

@ -29,7 +29,6 @@
#include "arg.h"
char *argv0;
static int insock;
static char *udsname;
#include "config.h"
@ -893,7 +892,6 @@ getipsock(void)
static void
cleanup(void)
{
close(insock);
if (udsname)
unlink(udsname);
}
@ -977,7 +975,7 @@ main(int argc, char *argv[])
struct group *grp = NULL;
struct rlimit rlim;
pid_t cpid, wpid;
int i, status = 0;
int i, insock, status = 0;
ARGBEGIN {
case 'd':