diff options
Diffstat (limited to 'src/util/service.c')
-rw-r--r-- | src/util/service.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/util/service.c b/src/util/service.c index 836501d38..551ab4825 100644 --- a/src/util/service.c +++ b/src/util/service.c | |||
@@ -1301,8 +1301,6 @@ setup_service (struct GNUNET_SERVICE_Context *sctx) | |||
1301 | int tolerant; | 1301 | int tolerant; |
1302 | 1302 | ||
1303 | #ifndef MINGW | 1303 | #ifndef MINGW |
1304 | const char *lpid; | ||
1305 | unsigned int pid; | ||
1306 | const char *nfds; | 1304 | const char *nfds; |
1307 | unsigned int cnt; | 1305 | unsigned int cnt; |
1308 | int flags; | 1306 | int flags; |
@@ -1343,9 +1341,7 @@ setup_service (struct GNUNET_SERVICE_Context *sctx) | |||
1343 | 1341 | ||
1344 | #ifndef MINGW | 1342 | #ifndef MINGW |
1345 | errno = 0; | 1343 | errno = 0; |
1346 | if ((NULL != (lpid = getenv ("LISTEN_PID"))) && | 1344 | if ((NULL != (nfds = getenv ("LISTEN_FDS"))) && |
1347 | (1 == SSCANF (lpid, "%u", &pid)) && (getpid () == (pid_t) pid) && | ||
1348 | (NULL != (nfds = getenv ("LISTEN_FDS"))) && | ||
1349 | (1 == SSCANF (nfds, "%u", &cnt)) && (cnt > 0) && (cnt < FD_SETSIZE) && | 1345 | (1 == SSCANF (nfds, "%u", &cnt)) && (cnt > 0) && (cnt < FD_SETSIZE) && |
1350 | (cnt + 4 < FD_SETSIZE)) | 1346 | (cnt + 4 < FD_SETSIZE)) |
1351 | { | 1347 | { |
@@ -1370,7 +1366,6 @@ setup_service (struct GNUNET_SERVICE_Context *sctx) | |||
1370 | break; | 1366 | break; |
1371 | } | 1367 | } |
1372 | } | 1368 | } |
1373 | unsetenv ("LISTEN_PID"); | ||
1374 | unsetenv ("LISTEN_FDS"); | 1369 | unsetenv ("LISTEN_FDS"); |
1375 | } | 1370 | } |
1376 | #else | 1371 | #else |