MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / waitForConnection

Function waitForConnection

src/plugin/ipc/ssh/dmtcp_ssh.cpp:122–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122static int
123waitForConnection(int listenSock)
124{
125 int fd = accept(listenSock, NULL, NULL);
126
127 if (fd == -1) {
128 perror("accept failed:");
129 exit(DMTCP_FAIL_RC);
130 }
131 close(listenSock);
132 return fd;
133}
134
135// shift args
136#define shift argc--, argv++

Callers 1

mainFunction · 0.85

Calls 2

acceptFunction · 0.50
closeFunction · 0.50

Tested by

no test coverage detected