multiCMD 1.18__tar.gz → 1.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: multiCMD
3
- Version: 1.18
3
+ Version: 1.19
4
4
  Summary: Run commands simultaneously
5
5
  Home-page: https://github.com/yufei-pan/multiCMD
6
6
  Author: Yufei Pan
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: multiCMD
3
- Version: 1.18
3
+ Version: 1.19
4
4
  Summary: Run commands simultaneously
5
5
  Home-page: https://github.com/yufei-pan/multiCMD
6
6
  Author: Yufei Pan
@@ -12,7 +12,7 @@ import re
12
12
  import itertools
13
13
  import signal
14
14
 
15
- version = '1.18'
15
+ version = '1.19'
16
16
  __version__ = version
17
17
 
18
18
  __running_threads = []
@@ -226,7 +226,13 @@ def __run_command(task,sem, timeout=60, quiet=False,dry_run=False,with_stdErr=Fa
226
226
  if stderr:
227
227
  __handle_stream(io.BytesIO(stderr),task.stderr, task)
228
228
  if task.returncode is None:
229
- task.returncode = -1
229
+ # process been killed via timeout or sigkill
230
+ if task.stderr and task.stderr[-1].strip().startswith('Timeout!'):
231
+ task.returncode = 124
232
+ elif task.stderr and task.stderr[-1].strip().startswith('Ctrl C detected, Emergency Stop!'):
233
+ task.returncode = 137
234
+ else:
235
+ task.returncode = -1
230
236
  if not quiet:
231
237
  print(pre+'\n'+ '-'*100+post)
232
238
  print(pre+f'Process exited with return code {task.returncode}'+post)
File without changes
File without changes
File without changes