Open asmodehn opened 7 years ago
BEFORE
alexv@asmodehn:~$ pstree -psl 10320
init(1)───lightdm(1877)───lightdm(32721)───init(5841)───xfce4-terminal(22140)───bash(24912)───pycharm.sh(16321)───java(16389)───bash(16687)───python(10320)─┬─rostful(10348)───python(10353)─┬─python(10357)─┬─{python}(10418)
│ │ └─{python}(10443)
│ ├─python(10378)
│ └─python(10403)─┬─{python}(10416)
│ ├─{python}(10417)
│ ├─{python}(10423)
│ ├─{python}(10424)
│ ├─{python}(10427)
│ └─{python}(10445)
├─{python}(10336)
└─{python}(10337)
alexv@asmodehn:~$ ps aux | grep rostful
alexv 10320 0.7 0.1 297352 25592 pts/9 Sl+ 09:54 0:00 python /home/alexv/ROS/gopher_desktop/devel/bin/roslaunch rostful rostful.launch --screen
alexv 10348 0.0 0.0 29644 3392 ? Ss 09:54 0:00 /bin/bash /home/alexv/ROS/gopher_bootstrap/src/rostful/scripts/rostful -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log ~connections_list:=/rocon/connection_cache/list ~connections_diff:=/rocon/connection_cache/diff __name:=rostful __log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 10353 0.2 0.1 111016 31112 ? S 09:54 0:00 python -tt -m rostful run -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log --ros-arg=~connections_list:=/rocon/connection_cache/list --ros-arg=~connections_diff:=/rocon/connection_cache/diff --ros-arg=__name:=rostful --ros-arg=__log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 10357 0.0 0.1 222188 23544 ? Sl 09:54 0:00 python -tt -m rostful run -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log --ros-arg=~connections_list:=/rocon/connection_cache/list --ros-arg=~connections_diff:=/rocon/connection_cache/diff --ros-arg=__name:=rostful --ros-arg=__log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 10378 0.0 0.1 179704 23804 ? S 09:54 0:00 python -tt -m rostful run -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log --ros-arg=~connections_list:=/rocon/connection_cache/list --ros-arg=~connections_diff:=/rocon/connection_cache/diff --ros-arg=__name:=rostful --ros-arg=__log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 10403 1.0 0.2 533820 43200 ? Sl 09:54 0:01 python -tt -m rostful run -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log --ros-arg=~connections_list:=/rocon/connection_cache/list --ros-arg=~connections_diff:=/rocon/connection_cache/diff --ros-arg=__name:=rostful --ros-arg=__log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 11026 0.0 0.0 20420 2132 pts/296 S+ 09:56 0:00 grep --color=auto rostful
alexv@asmodehn:~$ rosnode kill /rostful
killing /rostful
killed
shutdown request : user request
AFTER
alexv@asmodehn:~$ pstree -psl 10320
init(1)───lightdm(1877)───lightdm(32721)───init(5841)───xfce4-terminal(22140)───bash(24912)───pycharm.sh(16321)───java(16389)───bash(16687)───python(10320)─┬─rostful(10348)───python(10353)─┬─python(10357)─┬─{python}(10418)
│ │ └─{python}(10443)
│ ├─python(10378)
│ └─python(10403)─┬─{python}(10416)
│ ├─{python}(10417)
│ └─{python}(10427)
├─{python}(10336)
└─{python}(10337)
alexv@asmodehn:~$ ps aux | grep rostful
alexv 10320 0.4 0.1 297352 25592 pts/9 Sl+ 09:54 0:01 python /home/alexv/ROS/gopher_desktop/devel/bin/roslaunch rostful rostful.launch --screen
alexv 10348 0.0 0.0 29644 3392 ? Ss 09:54 0:00 /bin/bash /home/alexv/ROS/gopher_bootstrap/src/rostful/scripts/rostful -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log ~connections_list:=/rocon/connection_cache/list ~connections_diff:=/rocon/connection_cache/diff __name:=rostful __log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 10353 0.1 0.1 111016 31112 ? S 09:54 0:00 python -tt -m rostful run -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log --ros-arg=~connections_list:=/rocon/connection_cache/list --ros-arg=~connections_diff:=/rocon/connection_cache/diff --ros-arg=__name:=rostful --ros-arg=__log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 10357 0.0 0.1 222188 23544 ? Sl 09:54 0:00 python -tt -m rostful run -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log --ros-arg=~connections_list:=/rocon/connection_cache/list --ros-arg=~connections_diff:=/rocon/connection_cache/diff --ros-arg=__name:=rostful --ros-arg=__log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 10378 0.0 0.1 179704 23804 ? S 09:54 0:00 python -tt -m rostful run -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log --ros-arg=~connections_list:=/rocon/connection_cache/list --ros-arg=~connections_diff:=/rocon/connection_cache/diff --ros-arg=__name:=rostful --ros-arg=__log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 10403 0.9 0.2 607552 43308 ? Sl 09:54 0:02 python -tt -m rostful run -h 127.0.0.1 -p 8080 -s flask -c /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.cfg -l /home/alexv/ROS/gopher_bootstrap/src/rostful/instance/rostful.log --ros-arg=~connections_list:=/rocon/connection_cache/list --ros-arg=~connections_diff:=/rocon/connection_cache/diff --ros-arg=__name:=rostful --ros-arg=__log:=/home/alexv/.ros/log/0cc1a44e-9cf6-11e6-abf8-0862664558c8/rostful-1.log
alexv 11601 0.0 0.0 20420 2144 pts/302 S+ 09:58 0:00 grep --color=auto rostful
Actually rosnode kill is NOT using Unix signals : https://github.com/ros/ros_comm/blob/kinetic-devel/tools/rosnode/src/rosnode/__init__.py#L224
So there are two ways to shutdown nodes and we need to test both....
An easy way to test is to put a print statement in the ros_interface.update loop.
Something is strange there, the child process should be the one known by the node, and the one killed. In that process the ros interface should be running...