Opened 11 years ago

Closed 11 years ago

#3420 closed enhancement (fixed)

Suggested Enhancement: allow nested "mythshutdown --lock" calls

Reported by: anonymous Owned by: paulh
Priority: minor Milestone: 0.21
Component: mythtv Version: head
Severity: low Keywords:
Cc: Ticket locked: no

Description

I find it useful to "nest" calls to "mythshutdown --lock", i.e. if "mythshutdown --lock" is executed n times than it takes n calls to "mythshutdown --unlock" to fully unlock rather than just one call. This makes it possible to run multiple long running tasks on a myth box and for the box to shutdown when the tasks are complete, using this simple script:

myth_master / # cat /media/bin/myth_task #!/bin/sh

trap "/usr/local/bin/mythshutdown --unlock" SIGHUP SIGINT SIGQUIT SIGABRT SIGKILL SIGALRM SIGSEGV SIGTERM

/usr/local/bin/mythshutdown --lock "$@" /usr/local/bin/mythshutdown --unlock trap - SIGHUP SIGINT SIGQUIT SIGABRT SIGKILL SIGALRM SIGSEGV SIGTERM myth_master / #

I've attached a diff for this enhancement - I hope that it gets included :-)

Attachments (1)

mythshutdown_nested_locks.diff (1.3 KB) - added by rd.mora@… 11 years ago.
Patch to allow nested calls to "mythshutdown --lock"

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by rd.mora@…

Patch to allow nested calls to "mythshutdown --lock"

comment:1 Changed 11 years ago by paulh

Milestone: unknown0.21
Owner: changed from Isaac Richards to paulh

This patch fails to apply with a malformed patch error. Even the usual trick of converting the line ends to unix style didn't work.

comment:2 Changed 11 years ago by paulh

Resolution: fixed
Status: newclosed

(In [14344]) Allow for nested calls to 'mythshutdown --lock'. See the ticket for a suggested use.

Closes #3420.

Note: See TracTickets for help on using tickets.