[GRASS-dev] pygrass: How to allow Ctrl-C to stop all subprocesses of GridModule

Nikos Alexandris nik at nikosalexandris.net
Fri Mar 9 00:01:25 PST 2018


* Moritz Lennert <mlennert at club.worldonline.be> [2018-03-08 15:05:46 +0100]:

>And another question on GridModule:
>
>For the same module using GridModule to split the task of edge 
>detection in a raster map into many parallel tasks, when I want to 
>stop the module run using Ctrl-C I get tons of
>
>Process PoolWorker-315:
>Traceback (most recent call last):
>Traceback (most recent call last):
>  File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in 
>_bootstrap
>  File "/usr/lib/python2.7/multiprocessing/process.py", line 267, in 
>_bootstrap
>    self.run()
>    self.run()
>  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
>  File "/usr/lib/python2.7/multiprocessing/process.py", line 114, in run
>    self._target(*self._args, **self._kwargs)
>    self._target(*self._args, **self._kwargs)
>  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
>  File "/usr/lib/python2.7/multiprocessing/pool.py", line 102, in worker
>    task = get()
>  File "/usr/lib/python2.7/multiprocessing/queues.py", line 374, in get
>    task = get()
>  File "/usr/lib/python2.7/multiprocessing/queues.py", line 374, in get
>    racquire()
>    racquire()
>KeyboardInterrupt
>
>
>and cannot stop the module, even when flooding the input with Ctrl-Cs.
>
>Any hint how to allow Ctrl-C to stop all subprocesses ?
>
>Moritz

Moritz, could it be a case related to the ones mentioned in

https://stackoverflow.com/a/1635084/1172302
https://stackoverflow.com/a/11816038/1172302

?

Nikos


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20180309/f7e7f74d/attachment.sig>


More information about the grass-dev mailing list