$PWD is defaulting to / in split window when using screen with exec
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Terminator |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Launch terminator with screen and exec , eg .terminator -e screen
then split window, in child windows $PWD is /
parent process reports e.g.
Unable to get cwd for PID 1473: [Errno 13] Permission denied: 'les'
where 1473 is the pid of the screen process
terminator version 0.96
ls -lh /proc/1473/
...
lrwxrwxrwx 1 root root 0 Jan 30 12:36 cwd
(which doesn't seem any different from the ones I can read)
ps auxfw
paul 1376 0.4 0.6 603148 25260 ? Sl 12:35 0:01 gnome-terminal
paul 1380 0.0 0.0 14788 848 ? S 12:35 0:00 \_ gnome-pty-helper
paul 1381 0.0 0.1 40208 4012 pts/3 Ss 12:35 0:00 \_ zsh
paul 1463 0.4 1.0 768088 42512 pts/3 Sl+ 12:36 0:01 \_ /usr/bin/python /usr/bin/terminator -e screen
paul 1472 0.0 0.0 0 0 pts/3 Z+ 12:36 0:00 \_ [/usr/bin/termin] <defunct>
paul 1473 0.0 0.0 26868 1176 pts/5 Ss+ 12:36 0:00 \_ screen
paul 1475 0.0 0.0 27028 1396 ? Ss 12:36 0:00 | \_ SCREEN
paul 1476 0.0 0.1 42584 4604 pts/6 Ss+ 12:36 0:00 | \_ /usr/bin/zsh
paul 1494 0.0 0.1 40212 4024 pts/7 Ss 12:36 0:00 \_ /usr/bin/zsh
paul 1565 0.0 0.0 18272 1216 pts/7 R+ 12:40 0:00 \_ ps auxfw
I get permission denied for the defunct process and the screen processes below it (1472,1473,1475) but not any of the shell instances (1476,1494) or the original terminator process(1463) -- tested using ls -lh /proc/1463/cwd etc
Note sure if it entirely clear form above but 1472 and 1473 are both child processes of 1463
.h
This only happens with exec not If I launch terminator normally and then run screen
See also 1098371 (I don't get a crash with 0.96 but do get this).
Changed in terminator: | |
milestone: | none → 1.0 |
Changed in terminator: | |
importance: | Undecided → Medium |
Changed in terminator: | |
status: | Incomplete → Confirmed |
Changed in terminator: | |
status: | Confirmed → Incomplete |
I had a little play around with this. It's a bit tricky to come up with a perfect solution. Possible options are:
1) We check the cwd of the children of the screen process. I can do this, but it's the first child process with a cwd, not necessarily the *current* shell/process in screen. Unless there is some way to determine which process is active under screen which I haven't discovered.
2) The cwd of the terminator process (where it was launched from)
3) The home directory of the user
4) The root folder.
I'm not sure which is most logical and follows the UI principle of "least surprise". I suspect 2 or 3. They are also easier and less invasive to implement.
Opinions?