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

Simon Peter speter at inf.ethz.ch
Mon May 7 11:40:59 CEST 2012


>         - trap "pkill -P $$" SIGINT can not kill previous cat process
>         properly,
>     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?

You shouldn't be starting the script twice at the same time. AFAIK, the 
serial console cannot be opened multiple times. The next time you start 
the script, the $$ should point to the right process, no?

>         - "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...

In fact, it prints only non-empty lines. And it should also have an -a 
added, in case non-printable characters are being sent. I've fixed this.

Simon



More information about the Barrelfish-users mailing list