Merge pull request from conserver/issue-38-task-execution

Issue 38 task execution
This commit is contained in:
Bryan Stansell 2020-05-01 15:11:11 -07:00 committed by GitHub
commit 11963af83e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 6 deletions

@ -3,7 +3,7 @@ env:
freebsd_12_task:
freebsd_instance:
image: freebsd-12-0-release-amd64
image_family: freebsd-12-1
install_script:
- pkg install -y autoconf automake
- ./package/setup-configure

@ -590,7 +590,6 @@ GetMaxFiles(void)
mf = (FD_SETSIZE - 1);
}
#endif
CONDDEBUG((1, "GetMaxFiles(): maxfiles=%d", mf));
return mf;
}
@ -890,7 +889,10 @@ FileRead(CONSFILE *cfp, void *buf, int len)
case simpleSocket:
while (retval < 0) {
if ((retval = read(cfp->fd, buf, len)) <= 0) {
if (retval == 0) {
CONDDEBUG((2,
"FileRead(): read(): fd=%d, retval=%d, errno=%d",
cfp->fd, retval, errno));
if (retval == 0 || errno == EIO) {
retval = -1;
break;
}
@ -1067,6 +1069,9 @@ FileWrite(CONSFILE *cfp, FLAG bufferonly, char *buf, int len)
case simpleSocket:
while (len > 0) {
if ((retval = write(fdout, buf, len)) < 0) {
CONDDEBUG((2,
"FileWrite(): write(): fd=%d, retval=%d, errno=%d, len=%d",
fdout, retval, errno, len));
if (errno == EINTR)
continue;
if (errno == EAGAIN) {
@ -1941,11 +1946,11 @@ ProbeInterfaces(in_addr_t bindAddr)
if ((ifc.ifc_len - r) < sizeof(*ifr))
break;
# ifdef HAVE_SA_LEN
# ifdef __FreeBSD__
# ifdef __FreeBSD__
if (sa->sa_len > sizeof(ifr->ifr_addr))
# else
# else
if (sa->sa_len > sizeof(ifr->ifr_ifru))
# endif
# endif
r += sizeof(ifr->ifr_name) + sa->sa_len;
else
# endif

@ -1452,6 +1452,10 @@ main(int argc, char **argv)
#if !USE_IPV6
ProbeInterfaces(bindAddr);
#endif
#if !HAVE_CLOSEFROM
i = GetMaxFiles();
CONDDEBUG((1, "main(): GetMaxFiles=%d", i));
#endif
/* initialize the timers */
for (i = 0; i < T_MAX; i++)