Browse Source

[3406] Ignore window size when calling ps to get process pid.

Without that change the name of the process will be truncated if the
command line to start the process is out of bounds of the window size.
When running unit tests on the build farm there is in fact no window so
the ps function wouldn't find a pid of Kea and the shell-based tests
would fail.
Marcin Siodelski 11 years ago
parent
commit
e95575469e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/lib/testutils/dhcp_test_lib.sh

+ 1 - 1
src/lib/testutils/dhcp_test_lib.sh

@@ -42,7 +42,7 @@ set_logger() {
 _GET_PIDS=     # Return value: holds space separated list of DHCPv6 pids.
 _GET_PIDS_NUM= # Return value: holds the number of DHCPv6 server pids.
 get_pids() {
-    _GET_PIDS=`ps axo pid,command | grep ${BIN} | grep -v grep | awk '{print $1}'`
+    _GET_PIDS=`ps axwwo pid,command | grep ${BIN} | grep -v grep | awk '{print $1}'`
     _GET_PIDS_NUM=`printf "%s" "${_GET_PIDS}" | wc -w | awk '{print $1}'`
 }