]> git.armaanb.net Git - asd-repo.git/blob - junk/tlp/patches/tlp-no-flock-wait.patch
Create junk repo
[asd-repo.git] / junk / tlp / patches / tlp-no-flock-wait.patch
1 diff --git a/../TLP-1.3.1/tlp-func-base.in b/./tlp-func-base.in
2 index 1bbc9c8..1cdff49 100644
3 --- a/../TLP-1.3.1/tlp-func-base.in
4 +++ b/./tlp-func-base.in
5 @@ -31,7 +31,6 @@ readonly TPACPIBAT=@TPACPIBAT@
6  readonly UDEVADM=udevadm
7  
8  readonly LOCKFILE=$RUNDIR/lock
9 -readonly LOCKTIMEOUT=2
10  
11  readonly PWRRUNFILE=$RUNDIR/last_pwr
12  readonly MANUALMODEFILE=$RUNDIR/manual_mode
13 @@ -236,8 +235,7 @@ lock_tlp () { # get exclusive lock: blocking with timeout
14      create_rundir
15      # open file for writing and attach fd 9
16      # when successful lock fd 9 exclusive and blocking
17 -    # wait $LOCKTIMEOUT secs to obtain the lock
18 -    if { exec 9> ${LOCKFILE}_${1:-tlp} ; } 2> /dev/null && $FLOCK -x -w $LOCKTIMEOUT 9 ; then
19 +    if { exec 9> ${LOCKFILE}_${1:-tlp} ; } 2> /dev/null && $FLOCK -x 9 ; then
20          echo_debug "lock" "lock_tlp($1).success"
21          return 0
22      else
23 diff --git a/./tlp-no-flock-wait.diff b/./tlp-no-flock-wait.diff
24 new file mode 100644
25 index 0000000..e69de29