File indexing completed on 2025-01-18 10:17:18
0001
0002
0003
0004 DEFAULT_PIPE="/tmp/jana_status"
0005
0006
0007 if [[ $
0008 echo "Usage: $0 <PID> [jana_status_pipe]"
0009 exit 1
0010 fi
0011
0012
0013 PID="$1"
0014 PIPE="${2:-$DEFAULT_PIPE}"
0015
0016
0017 if ! kill -0 "$PID" 2>/dev/null; then
0018 echo "Error: Process with PID $PID does not exist."
0019 exit 1
0020 fi
0021
0022
0023 if [[ ! -p "$PIPE" ]]; then
0024 echo "Error: Named pipe '$PIPE' does not exist."
0025 exit 1
0026 fi
0027
0028
0029 if ! kill -USR1 "$PID"; then
0030 echo "Error: Failed to send SIGUSR1 to PID $PID."
0031 exit 1
0032 fi
0033
0034
0035 cat "$PIPE"