yselkowitz / caja-terminal

caja-terminal is a embedded terminal in caja
GNU General Public License v3.0
4 stars 5 forks source link

Not killing spawned bash processes #10

Open imciner2 opened 6 years ago

imciner2 commented 6 years ago

When Caja is opened with caja-terminal enabled in Fedora 26, the bash processes for the terminal doen't get killed when the directory changes in Caja and the terminal updates. This means that the old bash process is still active on the system, and locks the directory resource.

This also prevents the unmount tools from working properly, since they see that a process still has the mounted resource open and will normally fail (unless forced).

Steps to Reproduce:

  1. Open Caja to a known directory (such as /usr/lib)
  2. Navigate to another directory further in the tree (such as /usr/lib/cups)
  3. Run lsof -c bash | grep cwd

Actual results:

The output of the lsof command lists that directory /usr/lib and /usr/lib/cups are both open in separate bash processes, even though the /usr/lib directory is no longer open in Caja itself. Navigating back to /usr/lib also spawns a new processes, so effectively this will continually spawn processes unbeknownst to the user. The only way to kill the resulting bash processes is to manually go into the terminal and find their PID to use the kill command.

Expected results:

Only /usr/lib/cups should be open (not /usr/lib as well).

yselkowitz commented 6 years ago

Unfortunately, I don't have time to track this down, but I will consider patches.