Compare commits
18 commits
bleeding
...
emergency/
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8343eef646 | ||
![]() |
a4d1f1d63f | ||
![]() |
bacbfb401f | ||
![]() |
28658a9b66 | ||
![]() |
9462d1a97f | ||
![]() |
cdcea14156 | ||
![]() |
90d2fe4d08 | ||
![]() |
45ffde4714 | ||
![]() |
97eaadcc3c | ||
![]() |
40db697600 | ||
![]() |
9fb27d0c41 | ||
![]() |
b775765581 | ||
![]() |
33d4d3c9f1 | ||
![]() |
7c8c38d983 | ||
![]() |
a791ab34b9 | ||
![]() |
92f9838c78 | ||
![]() |
ac7d4e1292 | ||
![]() |
7437d4a887 |
5 changed files with 25 additions and 29 deletions
|
@ -8,6 +8,8 @@ init:
|
|||
- set MSYSTEM=MINGW64
|
||||
- pacman --noconfirm --needed -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
|
||||
- set "PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\build;%APPVEYOR_BUILD_FOLDER%\build\Debug;%APPVEYOR_BUILD_FOLDER%\build\external\bin;%APPVEYOR_BUILD_FOLDER%\build\external\lib"
|
||||
- reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f
|
||||
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
environment:
|
||||
COVERALLS_REPO_TOKEN:
|
||||
|
@ -90,6 +92,9 @@ test_script:
|
|||
$host.setshouldexit(1)
|
||||
}
|
||||
|
||||
on_finish:
|
||||
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
#after_test:
|
||||
# - 'make coveralls'
|
||||
|
||||
|
|
2
dependencies/nanomsg-patched
vendored
2
dependencies/nanomsg-patched
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 8e0095aa750f300003afb27cb408df3f9b6b2364
|
||||
Subproject commit 6c69690f119cceea47b85dc34ca88ea82893f597
|
|
@ -263,6 +263,8 @@ static void CALLBACK handle_child_terminated(PVOID lpParameter,
|
|||
? WEXITSTATUS(status)
|
||||
: WTERMSIG(status);
|
||||
|
||||
Sleep(100);
|
||||
|
||||
criterion_protocol_msg msg = criterion_message(death,
|
||||
.result = result,
|
||||
.has_status = true,
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "compat/process.h"
|
||||
#include "core/worker.h"
|
||||
|
||||
#define URL "ipc://%scriterion_%llu.sock"
|
||||
#define URL "tcp://127.0.0.1:4224"
|
||||
|
||||
#define errno_ignore(Stmt) do { int err = errno; Stmt; errno = err; } while (0)
|
||||
|
||||
|
@ -40,18 +40,9 @@ int bind_server(void) {
|
|||
if (sock < 0)
|
||||
return -1;
|
||||
|
||||
#ifdef VANILLA_WIN32
|
||||
char *prefix = "";
|
||||
#else
|
||||
char *prefix = "/tmp/";
|
||||
#endif
|
||||
nn_setsockopt(sock, NN_SOL_SOCKET, NN_LINGER, &(int) {-1}, sizeof (int));
|
||||
|
||||
char url[256];
|
||||
int rc = snprintf(url, sizeof (url), URL, prefix, get_process_id());
|
||||
if (rc == 256)
|
||||
cr_panic("IPC url too long");
|
||||
|
||||
if (nn_bind(sock, url) < 0)
|
||||
if (nn_bind(sock, URL) < 0)
|
||||
goto error;
|
||||
|
||||
return sock;
|
||||
|
@ -69,18 +60,9 @@ int connect_client(void) {
|
|||
if (sock < 0)
|
||||
return -1;
|
||||
|
||||
#ifdef VANILLA_WIN32
|
||||
char *prefix = "";
|
||||
#else
|
||||
char *prefix = "/tmp/";
|
||||
#endif
|
||||
nn_setsockopt(sock, NN_SOL_SOCKET, NN_LINGER, &(int) {-1}, sizeof (int));
|
||||
|
||||
char url[256];
|
||||
int rc = snprintf(url, sizeof (url), URL, prefix, get_runner_process_id());
|
||||
if (rc == 256)
|
||||
cr_panic("IPC url too long");
|
||||
|
||||
if (nn_connect (sock, url) < 0)
|
||||
if (nn_connect (sock, URL) < 0)
|
||||
goto error;
|
||||
|
||||
return sock;
|
||||
|
|
|
@ -91,12 +91,19 @@ void cr_send_to_runner(const criterion_protocol_msg *message) {
|
|||
}
|
||||
|
||||
unsigned char *buf = NULL;
|
||||
int read = nn_recv(g_client_socket, &buf, NN_MSG, 0);
|
||||
int read = 0;
|
||||
|
||||
if (read <= 0) {
|
||||
criterion_perror("Could not read ack: %s.\n", nn_strerror(errno));
|
||||
abort();
|
||||
}
|
||||
do {
|
||||
read = nn_recv(g_client_socket, &buf, NN_MSG, 0);
|
||||
|
||||
if (read <= 0) {
|
||||
if (read == -1 && errno == EFSM)
|
||||
continue;
|
||||
criterion_perror("Could not read ack: %s.\n", nn_strerror(errno));
|
||||
abort();
|
||||
}
|
||||
break;
|
||||
} while (true);
|
||||
|
||||
criterion_protocol_ack ack;
|
||||
pb_istream_t stream = pb_istream_from_buffer(buf, read);
|
||||
|
|
Loading…
Add table
Reference in a new issue