diff options
| author | Jonathan Weth <mail@jonathanweth.de> | 2020-07-24 15:38:52 +0200 |
|---|---|---|
| committer | Jonathan Weth <mail@jonathanweth.de> | 2020-07-24 15:38:52 +0200 |
| commit | 4db238a1395b33e76711d310f92090f803af41d4 (patch) | |
| tree | 40fe376960d4b223725428906ab46ee49e769299 /session.py | |
| parent | 1ab805a06575658d99954ef3f559a6788f9156a7 (diff) | |
| parent | 10e98e827e71c7a415e46b633381d56dbb1cc97c (diff) | |
| download | RWA.Support.SessionService-4db238a1395b33e76711d310f92090f803af41d4.tar.gz RWA.Support.SessionService-4db238a1395b33e76711d310f92090f803af41d4.tar.bz2 RWA.Support.SessionService-4db238a1395b33e76711d310f92090f803af41d4.zip | |
Merge branch 'pr/bug-invalid-pid-dbus' into 'master'
Prevent crashing when asking for status with invalid pid
See merge request remotewebapp/session-service!3
Diffstat (limited to 'session.py')
| -rw-r--r-- | session.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -100,10 +100,8 @@ class Session: self.ws_port = port_for.select_random() self.vnc_port = port_for.select_random() - # Use negative values to ensure we don't do something harmful - # to random processes - self.ws_pid = int("-" + random_digits(5)) - self.vnc_pid = int("-" + random_digits(5)) + self.ws_pid = int(random_digits(5)) + self.vnc_pid = int(random_digits(5)) # Create a temporary file to indicate that this process is still 'Running' filename = f"/tmp/rwa/{str(self.ws_port) + str(self.vnc_port) + str(self.ws_pid) + str(self.vnc_pid)}.lock" |
