On Thu, Feb 27, 2014 at 10:46:26AM +0100, Bernhard Voelker wrote: > Although the man page does not mention the exit status, I think > it's wrong that 'chcpu' exits OK when an action failed or > when a bad CPU number was specified: > > $ ./chcpu -d 0 ; echo $? > CPU 0 is not hot pluggable > 0 > > $ ./chcpu -g 3 ; echo $? > CPU 3 is not configurable > 0 > > $ ./chcpu -e 4 ; echo $? > CPU 4 does not exist > 0 > > WDYT? The question is: what should chcpu return if it partially succeeded? # chcpu -d 3-4 CPU 3 disabled CPU 4 does not exist If I remember correctly this was the reason to make it always return 0. However, it is indeed valid to say if *everything* failed, it should return an error. Hm? -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html