[Crash-utility] 6.0.5 foreach problem with state RU

Bob Montgomery bob.montgomery at hp.com
Mon Mar 26 22:43:14 UTC 2012


On Fri, 2012-03-23 at 12:14 -0400, Dave Anderson wrote:
> Download from: http://people.redhat.com/anderson
> 
> Changelog:

>  
>  - Enhancement to the "foreach" command which adds a new "state" 
>    task-indentifier argument that filters tasks by their task state.  
>    The state argument may be any of the task states displayed by 
>    the "ps" command: RU, IN, UN, ST, ZO, SW or DE.
>    (rabin at rab.in, anderson at redhat.com)
>  

This doesn't work for RU on my system because _RUNNING_ is 0x0 and (0x0
& 0x0) is 0x0 in this line in task.c:

5603                 if ((fd->flags & FOREACH_STATE) && !(task_state(tc->task) & fd->state))
5604                         continue;

If I change '&' to '==', it works, but I'm not sure if task_state(tc->task) is restricted
to a single flag.  Might need to check both, maybe?

Bob Montgomery







More information about the Crash-utility mailing list