Re: patches and responses...

summary: description and an offer.

On Wed, Aug 23, 2000 at 12:21:08PM +0930, wrote:
> Second, the specific patch in question seems to have
> little value.  The shell maintains cwd, not the
> terminal instance, which really only displays
> the output of the shell (although not having
> seen the specific patch, i could be mistaken).
> Unless bash, etc were to take part in the session
> saving, it would have little real value.

thanks, i'm aware of the individual roles.

bash doesn't need to take part in session saving to save the cwd, and
in fact it really can't - it doesn't know which gnome-terminal it's in,
at least in a way that crosses sessions.  besides, bash is not the
only shell in the world.  there's tcsh, zsh, ash(?!), rc, ksh, etc.
and then there are the shells on propreitary boxes.  and maybe some apps
that change dirs could use this as well.

what does the patch do?

what an excellent question.

when save-session is called gnome-terminal loops though it's open screens.
it saves various bits of info and it's in here i save the cwd.  to do this
i peek in the term variable to get the child's pid (the shell).  i
then do a readlink on /proc/<pid>/cwd to get the cwd.  obviously on
systems that don't support /proc/<pid>/cwd this call will fail and this
bit of info won't be stored.  i hope a solaris person can tweak this for
their systems, etc.

on load, i just load up the value of cwd if it exists and then do a chdir
to it before starting the child.

no need to involve the shell.

and at least two people *do* find this of value.

and since no-one else seems to be the maintainer, i offer to be the


--        perl -e 'print(map{chr($a+=$_)}(119,-18,7,0,-64,-12,
fork()'ed on 37058400    79,-1,-2,13,-89,83,-4,-2,-8,15,-11,4,-8,14,-105))'
meatspace place: home  yank?
 >> want privacy? or  encrypted mail preferred <<

PGP signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]