Re: [dev] dvtm: bug report: Mod-C

From: Greg Reagle <greg.reagle_AT_umbc.edu>
Date: Tue, 24 Nov 2015 09:31:40 -0500

On 11/24/2015 06:59 AM, Greg Reagle wrote:
> Mod-C Create a new shell window using the current working directory of
> the focused window.
>
> This is mod key followed by capital C. For me it does the same things
> as mod key followed by lower case c, i.e. it has no effect on the
> working directory of the new client window.
>
> For me this bug is reproducible without any effort--it never works.
>
> I've debugged and found the source of the problem. Output of ps xf:
>
> 22958 pts/2 S 0:27 \_ ddd ./dvtm
> 22967 pts/5 Ss+ 0:06 | \_ gdb -q -fullname ./dvtm
> 25217 pts/5 t 0:00 | | \_
> /home/greg/computer/apps/dvtm/dvtm
> 25231 pts/6 Ss 0:00 | | \_ /usr/bin/fish -c
> /usr/bin/fish
> 25245 pts/6 S+ 0:00 | | \_ /usr/bin/fish
>
> The function getcwd_by_pid() in dvtm.c uses 25231 for c->pid. So dvtm
> considers process 25231 to be the client of the window. But the cwd of
> 25231 never changes. It is the cwd of 25245 that changes.
>
> The only way I can think to solve this problem is to remove this extra
> level of process spawning. I don't understand why dvtm does this, but I
> assume that there is a good reason that I just don't understand.

And here is a fix attached.


Received on Tue Nov 24 2015 - 15:31:40 CET

This archive was generated by hypermail 2.3.0 : Tue Nov 24 2015 - 15:36:09 CET