redBorder/rb_monitor

Use POSIX compatible command

Bigomby opened this issue · 0 comments

On file tests/0008-monitors-split-timestamp.c there is a command:

#define LOAD_5_OP                                                              \
  "[[ -f $PPID.pid ]] && "                                                     \
  "(echo '10:20;60:40'; rm $PPID.pid;) || "                                    \
  "(echo '10:20;30:40'; touch $PPID.pid;)"

In POSIX sh, [[ ]] is undefined so it's needs to be something like

#define LOAD_5_OP                                                              \
  "test -f $PPID.pid  && "                                                     \
  "(echo '10:20;60:40'; rm $PPID.pid;) || "                                    \
  "(echo '10:20;30:40'; touch $PPID.pid;)"

to ensure POSIX compatibility.