9 while getopts c:p:n: f; do
11 c) ionice_class=$OPTARG;;
12 p) ionice_priority=$OPTARG;;
22 if pgrep -u "$(id -u)" -xf -- "$cmd" >/dev/null 2>&1; then
26 if type ionice >/dev/null 2>&1; then
27 [ -n "$ionice_class" ] && { io=1; cmd="-c $ionice_class $cmd"; }
28 [ -n "$ionice_priority" ] && { io=1; cmd="-n $ionice_priority $cmd"; }
29 [ -n "$io" ] && cmd="ionice $cmd"
32 if type nice >/dev/null 2>&1; then
33 [ -n "$nice" ] && cmd="nice -n $nice $cmd"
36 exec nohup $cmd >/dev/null 2>&1 &