Skip to content

Commit 8646297

Browse files
committed
driver: SigrokDriver unsuccessful sigrok-cli termination when used remotely
the signal that is supposed to terminate the process SIGINT was not being propagated through ssh. The driver waited for termination forever. fixed by quitting sigrok-cli through an emulated keypress by sending a char over ssh. Signed-off-by: Felix Zwettler <Felix.Zwettler@duagon.com>
1 parent c547b05 commit 8646297

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

labgrid/driver/sigrokdriver.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import re
33
import subprocess
44
import shutil
5-
import signal
65
import tempfile
76
import time
87
import uuid
@@ -171,8 +170,8 @@ def stop(self):
171170
fnames.extend(self.sigrok.channels.split(','))
172171
csv_filename = f'{os.path.splitext(self._basename)[0]}.csv'
173172

174-
self._process.send_signal(signal.SIGINT)
175-
stdout, stderr = self._process.communicate()
173+
# sigrok-cli can be quit through any keypress
174+
stdout, stderr = self._process.communicate(input="q")
176175
self.logger.debug("stdout: %s", stdout)
177176
self.logger.debug("stderr: %s", stderr)
178177

0 commit comments

Comments
 (0)