[Barrelfish-users] FYI, a Fix for /tools/scc/watchall.sh

Shi Jinghao (史经浩) jhshi at cs.hku.hk
Mon May 7 07:59:13 CEST 2012


On Sat, May 5, 2012 at 1:17 AM, Simon Peter <speter at inf.ethz.ch> wrote:

> Thanks for your patch!
>
>
>  - trap "pkill -P $$" SIGINT can not kill previous cat process properly,
>> so each time I'll get a "device
>> busy" error
>>
>
> Can you point out why it is failing? It seems to be working here.
> Unfortunately, your fix will end up killing any cat process in the system,
> which is not desirable.


My understanding is that the script's process id ($$) is not the same on
each run. So the second run of the script fail to kill the cat processes
created by the first run of the script. Is this reasonable?

As for the potential side effect of killing other cat processes, I haven't
figure out how to resolve this...


>
>  - "cat /dev/crbif0rb0c${i}ttyS0 | grep . --line-buffered &" in the for
>> loop can not display the
>> outputs properly: only empty lines are printed.
>>
>
> Thanks for fixing this one. I'm not sure why it prints only empty lines in
> your case, though I see no problem applying your fix.


I don't know why it fails here either. I tried stackoverflow[1][2] by get
no useful answer. Personally, I suspect that there are some control bytes
in the UART stream that fools grep, but I'm not sure...

[1]
http://stackoverflow.com/questions/10429434/concurrent-uart-output-with-line-buffered
[2] http://stackoverflow.com/questions/10443704/line-buffered-cat

>
>
> Simon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20120507/62a0148c/attachment.html 


More information about the Barrelfish-users mailing list