Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 553978 | Differences between
and this patch

Collapse All | Expand All

(-)orig/sh/rc-cgroup.sh.in (-1 / +21 lines)
Lines 85-92 cgroup_add_service() Link Here
85
	openrc_cgroup=/sys/fs/cgroup/openrc
85
	openrc_cgroup=/sys/fs/cgroup/openrc
86
	if [ -d "$openrc_cgroup" ]; then
86
	if [ -d "$openrc_cgroup" ]; then
87
		cgroup="$openrc_cgroup/$RC_SVCNAME"
87
		cgroup="$openrc_cgroup/$RC_SVCNAME"
88
89
    #the delay these introduce, seems to prevent wtw race is going on that causes this: /lib64/rc/sh/rc-cgroup.sh: line 89: printf: write error: No such device
90
    echo "Current: $$ $RC_SVCNAME" 2>/dev/null 1>&2
91
    ps afwj $$ 2>/dev/null 1>&2
92
  #^tested and confirmed to FAIL(2) (at boot) when the above 2 lines are commented out! but not when they are uncommented! so, draw your own conclusions.
88
		mkdir -p "$cgroup"
93
		mkdir -p "$cgroup"
89
		[ -f "$cgroup/tasks" ] && printf "%d" 0 > "$cgroup/tasks"
94
    local fail=0
95
		if test -f "$cgroup/tasks"; then
96
      if ! printf "%d" 0 > "$cgroup/tasks"; then
97
        fail=1
98
      fi
99
    else
100
      fail=2
101
    fi
102
    if test "$fail" -ne "0"; then
103
      echo "------FAIL(${fail})----- $cgroup/tasks" 1>&2
104
      echo "Current: $$ $RC_SVCNAME" 1>&2
105
      cat "$cgroup/tasks"
106
    fi
107
#    [ -f "$cgroup/tasks" ] || ls -la "$openrc_cgroup" 1>&2
108
109
#		[ -f "$cgroup/tasks" ] && printf "%d" 0 > "$cgroup/tasks"
90
	fi
110
	fi
91
}
111
}
92
112

Return to bug 553978