"cat /proc/20502/wchan" vs strace vs man page

2007-09-24 Thread Johan Walles
Try this: 1. At one prompt, do "cat". Now, switch to another prompt and... 2. Do "pstree -p|grep cat" to find out the PID of your cat command. I get 20502. 3. Do "cat /proc/20502/wchan". I get "0" here. 4. Do "strace -p 20502". I get "read(0, " here. So wchan says cat is waiting for "0".

cat /proc/20502/wchan vs strace vs man page

2007-09-24 Thread Johan Walles
Try this: 1. At one prompt, do cat. Now, switch to another prompt and... 2. Do pstree -p|grep cat to find out the PID of your cat command. I get 20502. 3. Do cat /proc/20502/wchan. I get 0 here. 4. Do strace -p 20502. I get read(0, unfinished ... here. So wchan says cat is waiting for 0.