stud icon indicating copy to clipboard operation
stud copied to clipboard

stud.init, wrong PID when "no DH parameters found"

Open ibc opened this issue 13 years ago • 1 comments

The init script provided by stun retrieves the daemonized process PID as follows:

out=`${prefix} ${STUD} ${opts} 2>&1`

...

stud_pid=`echo "${out}" | tail -n 1 | cut -d " " -f5 | tr -d '.'`

But depending on the provided certificate, the first line printed to stdout by the daemonized stud process is:

{core} Note: no DH parameters found in PATH_TO_CERT_FILE

and therefore the retrieved PID would be wrong (or null).

ibc avatar Jul 25 '12 15:07 ibc

NOTE: the line {core} Note: no DH parameters found in PATH_TO_CERT_FILE is sent to stderr. However the init scripts previously does 2>&1 and therefore such a line would be redirected to the stdout and thus captured by the tail command as the first line => PID wont be retrieved.

ibc avatar Jul 25 '12 15:07 ibc