joshua-redfield / lauf

A lightweight application and task launcher programmed in the shell scripting language. Lauf is no longer being updated or improved.
http://github.com/joshua-redfield/lauf
GNU General Public License v3.0
3 stars 0 forks source link

One Instance Not removing lock file #17

Closed joshua-redfield closed 13 years ago

joshua-redfield commented 13 years ago

There's certain circumstances where Lauf is not removing it's Lock file, this is usually caused by a crash or by forcefully killing Lauf. If for some reason Lauf is no longer opening for you, rm /tmp/LAUF_LOCK.txt will fix the problem. Solution: Use trap builtin.

somasis commented 13 years ago

trap is a shell built-in, not coreutils, but that doesn't matter.

How would we catch it considering trap watches for control-c and signals? Error codes wouldn't function correctly with just a trap put in, so we would probably have to implement both a trap and an error code check.

joshua-redfield commented 13 years ago

Yeah you're right about it being a built-in, My bad. I had something else on mind when I was writing up this issue. I haven't use trap much myself, but a quick google search came up with this: trap "command" INT TERM EXIT

somasis commented 13 years ago

yeah, that should block signal 15 (TERM, the regular kill command), control-c (INT).

joshua-redfield commented 13 years ago

You seem to have a better understanding of trap than I do. Feel free to implement a fix.

somasis commented 13 years ago

Well, it's not much trap as it is kill signals. You can find them all from looking the 'signal' manpage. (not a program, just a manpage that comes with linux.) I'll try implementing it. Closed.

joshua-redfield commented 13 years ago

Until this issue is fixed it should remain open.

joshua-redfield commented 13 years ago

Implemented a trap which does seem to fix the issue, havn't tested crashes yet though.

joshua-redfield commented 13 years ago

Fixed and Closed.