Skip to content

Commit a671f98

Browse files
committed
- Fix for zombie processes
1 parent d1270e9 commit a671f98

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

default.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self):
5353
if script_xbmc_starts:
5454
log('Going to execute script = "' + script_xbmc_starts + '"')
5555
try:
56-
subprocess.Popen([script_xbmc_starts])
56+
subprocess.call(script_xbmc_starts)
5757
except:
5858
log('Error executing script when xbmc starts')
5959
self._daemon()
@@ -104,7 +104,7 @@ def _daemon(self):
104104
log('XBMC is idle')
105105
log('Going to execute script = "' + script_idle + '"')
106106
try:
107-
subprocess.Popen([script_idle])
107+
subprocess.call(script_idle)
108108
except:
109109
log('ERROR executing script when xbmc goes idle')
110110
xbmc.sleep(10000)
@@ -126,7 +126,7 @@ def onScreensaverActivated(self):
126126
if script_screensaver_starts:
127127
log('Going to execute script = "' + script_screensaver_starts + '"')
128128
try:
129-
subprocess.Popen([script_screensaver_starts,self.get_player_status()])
129+
subprocess.call([script_screensaver_starts,self.get_player_status()])
130130
except:
131131
log('ERROR executing script when screensaver starts')
132132

@@ -136,7 +136,7 @@ def onScreensaverDeactivated(self):
136136
if script_screensaver_stops:
137137
log('Going to execute script = "' + script_screensaver_stops + '"')
138138
try:
139-
subprocess.Popen([script_screensaver_stops])
139+
subprocess.call(script_screensaver_stops)
140140
except:
141141
log('ERROR executing script when screensaver stops')
142142

@@ -146,7 +146,7 @@ def onDatabaseUpdated(self,db):
146146
if script_db_update:
147147
log('Going to execute script = "' + script_db_update + '"')
148148
try:
149-
subprocess.Popen([script_db_update,db])
149+
subprocess.call([script_db_update,db])
150150
except:
151151
log('ERROR executing script when database updates')
152152

@@ -200,7 +200,7 @@ def onPlayBackStarted(self):
200200
if script_player_starts:
201201
log('Going to execute script = "' + script_player_starts + '"')
202202
try:
203-
subprocess.Popen([script_player_starts,self.playing_type()])
203+
subprocess.call([script_player_starts,self.playing_type()])
204204
except:
205205
log('ERROR executing script when player starts')
206206

@@ -213,7 +213,7 @@ def onPlayBackStopped(self):
213213
if script_player_stops:
214214
log('Going to execute script = "' + script_player_stops + '"')
215215
try:
216-
subprocess.Popen([script_player_stops,self.playing_type()])
216+
subprocess.call([script_player_stops,self.playing_type()])
217217
except:
218218
log('ERROR executing script when player stops')
219219

@@ -223,7 +223,7 @@ def onPlayBackPaused(self):
223223
if script_player_pauses:
224224
log('Going to execute script = "' + script_player_pauses + '"')
225225
try:
226-
subprocess.Popen([script_player_pauses,self.playing_type()])
226+
subprocess.call([script_player_pauses,self.playing_type()])
227227
except:
228228
log('ERROR executing script when player pauses')
229229

@@ -233,7 +233,7 @@ def onPlayBackResumed(self):
233233
if script_player_resumes:
234234
log('Going to execute script = "' + script_player_resumes + '"')
235235
try:
236-
subprocess.Popen([script_player_resumes,self.playing_type()])
236+
subprocess.call([script_player_resumes,self.playing_type()])
237237
except:
238238
log('ERROR executing script when player resumes')
239239

0 commit comments

Comments
 (0)