[dev] [dvtm] create in $CWD not working

From: Ross Mohn <rpmohn_AT_waxandwane.org>
Date: Wed, 15 Jul 2015 11:32:38 -0400


The create() function can take a third argument in order to use the
directory of the current client, sel, when it creates a new client.
This command is mapped to MOD+C by default. To implement this, the
function uses the /proc/ tree to find the current directory of process
sel->pid. The problem, at least for me, is that sel->pid is the generic
sh that spawns the actual user shell, so when I cd in my shell, the cwd
of the calling sh process doesn't change.

    $ pstree -p 2199

For example, sel->pid is 2324, and I'm interacting with shell pid 2325.
The cwd of process 2324 is ~/, but I've changed the cwd of process 2325
to ~/local/repos/dvtm/. When I press MOD+C in my shell, dvtm creates a
new client with cwd of ~/, same as sel->pid 2324, not where I expect it
to in ~/local/repos/dvtm/.

Do others also have this issue? I'm not very familiar with /proc/; is
there something in there that could be used to identify the user shell
instead? But that might not work for everyone.

Thanks -Ross
Received on Wed Jul 15 2015 - 17:32:38 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 15 2015 - 17:36:09 CEST