[florian@florian-desktop ~]$ r2 -
-- THE CAKE IS A PIE
[0x00000000]> & #!pipe python p.py
[0x00000000]> &
0 running -- MAIN TASK --
1 sleeping #!pipe python p.py
--
total running: 1
[0x00000000]> &b 1
Task 1 finished
[0x00000000]> ^D
[florian@florian-desktop ~]$ ps f
PID TTY STAT TIME COMMAND
(...)
11156 pts/12 S 0:00 radare2 -
11157 pts/12 S 0:00 \_ python p.py
The python process is still running.
p.py:
import r2pipe
import time
r2=r2pipe.open()
while True:
r2.cmd("?e jiji")
time.sleep(1)
To be fixed in libr/lang/p/pipe.c. Probably by sending SIGINT to the child process and waiting for it to quit.
This issue was already present before tasks, it just didn't really become visible because if you pressed ^C while a script was running in the foreground, the SIGINT would be delivered to python instead of r2 and breaking from r2 side never happened.
Example:
The python process is still running.
p.py:
To be fixed in
libr/lang/p/pipe.c
. Probably by sending SIGINT to the child process and waiting for it to quit.This issue was already present before tasks, it just didn't really become visible because if you pressed ^C while a script was running in the foreground, the SIGINT would be delivered to python instead of r2 and breaking from r2 side never happened.