...

Text file src/golang.conradwood.net/tests/linuxcom/test_com.sh

Documentation: golang.conradwood.net/tests/linuxcom

     1#!/bin/bash
     2a=0;
     3DAEMON=../../../../c/test-daemon/test-daemon
     4if [ ! -x ${DAEMON} ]; then
     5    echo cannot execute ${DAEMON}
     6    exit 10
     7fi
     8${DAEMON} -i -d $$ &
     9
    10max=40
    11while [ true ]; do
    12    a=$((a+1))
    13    sleep 0.1
    14    CGROUP=`cat /proc/self/cgroup`
    15    echo  "random text $a in cgroup ${CGROUP} "
    16    if [ $a -gt $max ]; then
    17	echo
    18	a=0
    19	max=$((1 + $RANDOM % 100))
    20    fi
    21done

View as plain text