Skip to content

Commit

Permalink
Merge pull request #106 from grondo/travis-fixes
Browse files Browse the repository at this point in the history
travis-ci: fix failed builds and error messages from pipecmd
  • Loading branch information
garlick committed Sep 7, 2017
2 parents 79aa5a4 + 0148334 commit 00f66b2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ script:
scripts/travis-ci-deps.sh;
eval $(scripts/travis-ci-deps.sh --printenv);
fi
- export CFLAGS="-Werror -Wno-error=deprecated-declarations"
- ./bootstrap
- ./configure --with-exec --with-ssh --with-mrsh --with-genders --with-dshgroups --with-netgroup --with-machines
- export CFLAGS="-Werror -Wno-error=deprecated-declarations"
- make -j 2 check

after_failure:
Expand Down
3 changes: 3 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ AC_CHECK_LIB([socket], [socket], LIBS="-lsocket -lnsl $LIBS",, [-lsocket -lnsl])

# Check for how to compile pthread programs:
ACX_PTHREAD
if test x"$acx_pthread_ok" = "xno"; then
AC_MSG_ERROR([Could not figure out how to compile with pthreads.])
fi
AC_DEFINE(WITH_PTHREADS, 1, [Define if you have pthreads])

# PTHREAD_CFLAGS needs to be appended to both LDFLAGS and CPPFLAGS or some
Expand Down
14 changes: 11 additions & 3 deletions src/common/pipecmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,17 @@ int pipecmd_wait (pipecmd_t p, int *pstatus)
err ("%p: %S: %s pid %ld: waitpid: %m\n", p->target,
xbasename (p->path), p->pid);

if (status != 0)
err ("%p: %S: %s exited with exit code %d\n",
p->target, xbasename (p->path), WEXITSTATUS (status));
if (status != 0) {
if (WIFEXITED (status))
err ("%p: %S: %s exited with exit code %d\n",
p->target, xbasename (p->path), WEXITSTATUS (status));
else if (WIFSIGNALED (status))
err ("%p: %S: %s killed by signal %d\n",
p->target, xbasename (p->path), WTERMSIG (status));
else
err ("%p: %S: %s exited with nonzero status 0x%04x\n",
p->target, xbasename (p->path), status);
}

if (pstatus)
*pstatus = status;
Expand Down

0 comments on commit 00f66b2

Please sign in to comment.