Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

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

Open
ibc opened this issue Jul 25, 2012 · 1 comment
Open

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

ibc opened this issue Jul 25, 2012 · 1 comment

Comments

@ibc
Copy link

ibc commented Jul 25, 2012

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
Copy link
Author

ibc commented Jul 25, 2012

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant