Openmoko Bug #2008: Suspend exceptions: Do not suspend when certain apps are running

Openmoko Public Trac bugs at docs.openmoko.org
Wed Sep 17 14:22:02 CEST 2008


#2008: Suspend exceptions: Do not suspend when certain apps are running
----------------------------------+-----------------------------------------
    Reporter:  Benih              |        Owner:  openmoko-kernel
        Type:  enhancement        |       Status:  new            
    Priority:  normal             |    Milestone:                 
   Component:  System Software    |      Version:  Om2008.8       
    Severity:  minor              |   Resolution:                 
    Keywords:  suspend exception  |    Blockedby:                 
Reproducible:                     |     Blocking:                 
----------------------------------+-----------------------------------------

Comment(by beni):

 I think, several rule files would be better than one, so packages can
 install rules that depend on ordering (imagine some package that asks the
 user or something).

 In addition to the above mentioned ideas, the best solution would be:
 The suspender looks in /usr/bin (or something like that, maybe /sbin is
 better?) for an executable (binary, script etc) called "suspend.deny". If
 he finds it, he calls it. If the return code is 0, then suspend, otherwise
 abort suspend.

 The default suspend solution should feature simple rule files.
 The rules will be stored below /etc/suspend.deny.d/. The rules files will
 be processed in alphabetical order, files will be named like "10somerule",
 "99alastrule". Rule files that do not depend on some partivular order
 should always start with "50", so overriding below and above is no
 problem.
 If one rule line of any rule file denies suspend, the following rules must
 not be evaluated. Instead, the suspend.deny implementation returns some
 code other than "0" immediately.

 The rules files should have a very simple syntax:
 [rule] [parameter1] [parameter2] ... [parameterN]


 The so far needed rules supported in the default implementation would be:
 - Executing of an external script (gives maximum flexibility to the user
 to implement stuff not yet available via rule)
 - testing process table by regex
 - testing "lsof" by regex
 - testing for file content by regex
 - testing for file existance

-- 
Ticket URL: <https://docs.openmoko.org/trac/ticket/2008#comment:6>
docs.openmoko.org <http://docs.openmoko.org/trac/>
openmoko trac


More information about the buglog mailing list