Project: talendesb
Issue TESB-9879: zkServer.sh script does not work correctly on AIX, Solaris and Windows platforms
The bin/zkServer.sh script creates a 'zookeeper_server.pid' file to store its process id - that does not work correctly on Solaris and Windows platforms, so that the process does not get terminated later when running "zkServer.sh stop". Specifically, on Solaris platform: /bin/echo -n $! > "$ZOOPIDFILE" /bin/echo on this platform does not have the "-n" parameter and thus, instead of the expected "", the "-n " output gets produced. Possibly, the embedded shell "echo" command should be used here instead. Please note, 'man 1 echo' on Solaris 10 says: "In addition, ksh's echo, does not have an -n option. sh's echo and /usr/bin/echo only have an -n option if the SYSV3 environment variable is set (see ENVIRONMENT VARIABLES below). If it is, none of the backslashed characters men- tioned above are available. csh's echo and /usr/ucb/echo, on the other hand, have an -n option, but do not understand the back-slashed escape characters." One more possible solution is probably to check if "-n" is really necessary here... On Windows platform: TASKLIST /FI ^"WINDOWTITLE eq zookeeper^" /NH the specified construct does not find the process correctly, thus causing just "0" to be output into the pid file. PS. As a separate issue here - the script should not end successfully and remove the .pid file if there were problems in the previous commands.
Story points: 2