projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
26dc505
)
Don't try to use kill() on Windows.
author
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 20 Mar 2017 21:19:36 +0000
(22:19 +0100)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 20 Mar 2017 21:20:25 +0000
(22:20 +0100)
src/tincctl.c
patch
|
blob
|
history
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
1f0246c
..
5067ded
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-1,6
+1,6
@@
/*
tincctl.c -- Controlling a running tincd
/*
tincctl.c -- Controlling a running tincd
- Copyright (C) 2007-201
6
Guus Sliepen <guus@tinc-vpn.org>
+ Copyright (C) 2007-201
7
Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-721,6
+721,8
@@
bool connect_tincd(bool verbose) {
}
fclose(f);
}
fclose(f);
+
+#ifndef HAVE_MINGW
if ((pid == 0) || (kill(pid, 0) && (errno == ESRCH))) {
fprintf(stderr, "Could not find tincd running at pid %d\n", pid);
/* clean up the stale socket and pid file */
if ((pid == 0) || (kill(pid, 0) && (errno == ESRCH))) {
fprintf(stderr, "Could not find tincd running at pid %d\n", pid);
/* clean up the stale socket and pid file */
@@
-729,7
+731,6
@@
bool connect_tincd(bool verbose) {
return false;
}
return false;
}
-#ifndef HAVE_MINGW
struct sockaddr_un sa;
sa.sun_family = AF_UNIX;
strncpy(sa.sun_path, unixsocketname, sizeof sa.sun_path);
struct sockaddr_un sa;
sa.sun_family = AF_UNIX;
strncpy(sa.sun_path, unixsocketname, sizeof sa.sun_path);