Welcome! Log In Create A New Profile

Advanced

Teacup Firmware: Enhancements to func.sh

Posted by jgilmore 
Teacup Firmware: Enhancements to func.sh
February 10, 2011 12:40PM
New pull request on github with the enhancements:here

I found that even though *I* know perfectly well to terminate mendel_talk with ^D, my fingers don't always remember, and then I forget why mendel_cmd isn't working and waste time.

So I fixed it to check for "cat" processes started from this terminal before and after, and if there aren't any before and are after, kill it! (sorry, hard sentence to parse, easier to read the code)

This way it doesn't matter if I forget and hit ^C instead, unless I already have a job running with a "cat" process in it. Which is unlikely, but at least this code won't screw up already running processes.

In theory, I suppose that I could make it check, store the list, and compare. But that's way too much effort for something that's a uncommon corner case anyway. I mean, I almost didn't even bother to check for previously running "cat" processes.

Also added a few comments.

[Edit: Changed name to "Teacup Firmware" for the purposes of not confusing folk, after irc discussion. --Sebastien]

Edited 1 time(s). Last edit at 02/22/2011 02:13AM by SebastienBailard.


--
I'm building it with Baling Wire
Sorry, only registered users may post in this forum.

Click here to login