Explorar o código

Fixed a file leak in the help message.

Thomas Flucke %!s(int64=6) %!d(string=hai) anos
pai
achega
700d6e67cc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/distributer/distribute.sh

+ 1 - 1
src/distributer/distribute.sh

@@ -1,6 +1,5 @@
 #!/bin/sh
 
-readonly PIPE_NAME="$(mktemp /tmp/distributer-XXX.fifo)"
 readonly CONF_LIST="$1"
 readonly SERVER_LIST="$2"
 
@@ -30,6 +29,7 @@ run_server() {
 }
 
 main() {
+    PIPE_NAME="$(mktemp /tmp/distributer-XXX.fifo)"
     rm "$PIPE_NAME"
     mkfifo "$PIPE_NAME"
     sed '/^[[:space:]]*$/d' "$CONF_LIST" > "$PIPE_NAME" &