You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The assumption here is that netcat is available. If it is not (because the command doesn't exist or the user is not allowed to execute the command) the result will be nonzero but will be reported as the port not yet being in use.
If we are going to use netcat, we should check for its existence and handle the error case that, then use fallback solutions.
and the diff of the file looks something like this:
# Export the module function if it exists
[[ $(type -t module) == "function" ]] && export -f module
+# override+port_used () {+ local port="${1#*:}"+ local host=$((expr "${1}" : '\\(.*\\):' || echo "localhost") | awk 'END{print $NF}')+ lsof -i :"${port}" &> /dev/null+}+export -f port_used+
# Find available port to run server on
port=$(find_port ${host})
If there is a reliable way to check if the pseudo-device /dev/tcp is available, we would check if that exists first, then use it if it does; if not then try something else.
See:
ood_core/lib/ood_core/batch_connect/template.rb
Lines 120 to 126 in a87f59e
The assumption here is that netcat is available. If it is not (because the command doesn't exist or the user is not allowed to execute the command) the result will be nonzero but will be reported as the port not yet being in use.
If we are going to use netcat, we should check for its existence and handle the error case that, then use fallback solutions.
Or not use netcat at all. See https://listsprd.osu.edu/pipermail/ood-users/2018-October/000269.html for discussion and some options and Trey's comment:
The text was updated successfully, but these errors were encountered: