Re: [PATCH v2 -mmotm 3/4] cgroups: Add simple listener of cgroup events to documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +	ret = dprintf(event_control, "%d %d %s", efd, cfd, argv[2]);

I found it won't return negative value for invalid input, though
errno is set properly.

try:
# ./cgroup_event_listner /cgroup/cgroup.procs abc

while strace shows write() does return -1:

# strace ./cgroup_event_listner /cgroup/cgroup.procs abc
...
write(6, "7 5 abc"..., 7)               = -1 EINVAL (Invalid argument)

> +	if (ret == -1) {
> +		perror("Cannot write to cgroup.event_control");
> +		goto out;
> +	}
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux