Changeset 4ae5b82 in mod_gnutls


Ignore:
Timestamp:
Feb 8, 2017, 7:27:17 AM (10 months ago)
Author:
Thomas Klute <thomas2.klute@…>
Branches:
master
Children:
fb4da99
Parents:
6c030c1
Message:

Check if flock supports --verbose

Some old versions of flock do not support the --verbose option, namely
the one in Debian Jessie. Check for support at configure time and
enable the option only if available.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • configure.ac

    r6c030c1 r4ae5b82  
    8484        AS_IF([${FLOCK} --timeout 1 ${lockfile} true >&AS_MESSAGE_LOG_FD 2>&1],
    8585              [flock_works="yes"], [flock_works="no"])
     86        AC_MSG_RESULT([$flock_works])
     87        # Old versions of flock do not support --verbose. They fail
     88        # without executing the command but still return 0. Check for
     89        # this behavior by testing if the rm command was executed.
     90        AC_MSG_CHECKING([whether ${FLOCK} supports --verbose])
     91        testfile="$(mktemp)"
     92        AS_IF([${FLOCK} --verbose --timeout 1 ${lockfile} rm "${testfile}" \
     93                        >&AS_MESSAGE_LOG_FD 2>&1; test ! -e "${testfile}"],
     94              [flock_verbose="yes"; FLOCK="${FLOCK} --verbose"],
     95              [flock_verbose="no"; rm "${testfile}"])
     96        AC_MSG_RESULT([$flock_verbose])
    8697        rm "${lockfile}"
    87         AC_MSG_RESULT([$flock_works])
    8898      ],
    8999      [flock_works="no"])
  • test/proxy_backend.bash

    r8184ad0 r4ae5b82  
    3838                    flock_cmd=""
    3939                elif [ -n "${lockfile}" ]; then
    40                     flock_cmd="${FLOCK} --verbose -w ${TEST_LOCK_WAIT} ${lockfile}"
     40                    flock_cmd="${FLOCK} -w ${TEST_LOCK_WAIT} ${lockfile}"
    4141                else
    4242                    echo "Locking disabled, using wait based on proxy PID file."
  • test/runtests

    r6c030c1 r4ae5b82  
    160160    flock_cmd=""
    161161elif [ -n "${TEST_LOCK}" ]; then
    162     flock_cmd="${FLOCK} --verbose -w ${TEST_LOCK_WAIT} $(realpath ${TEST_LOCK})"
     162    flock_cmd="${FLOCK} -w ${TEST_LOCK_WAIT} $(realpath ${TEST_LOCK})"
    163163else
    164164    echo "Locking disabled, using wait based on Apache PID file."
Note: See TracChangeset for help on using the changeset viewer.