[Geany-devel] altername session management implementation

Dimitar Zhekov dimitar.zhekov at xxxxx
Wed Jun 30 18:48:15 UTC 2010

On Wed, 30 Jun 2010 12:09:43 +0400
Eugene Arshinov <earshinov at gmail.com> wrote:

> On Wed, 19 May 2010 14:17:52 +0300%
> Dimitar Zhekov <hamster at mbox.contact.bg> wrote:
> > The patch applies against the latest svn-4933. Of course, it should
> > not be included in 0.19, I only finished it today. Some parts of
> > Eugene's SM were reverted, since they were not required.
> > 
> Hi.  Several questions and suggestions here :)
> 1. On my system your version do not automatically remove temporary
> SM-related session files.  Is it supposed to do so?  I saw that you
> specified DiscardCommand.

They are removed when a program ceases to be part of the session (i.e.
when you close an instance), not on session restart or something.

> 2. Is tm_get_real_path() really necessary in
> utils_option_entry_reverse_parse() for command-line
> options of G_OPTION_ARG_FILENAME type?  I saw tm_get_real_path()
> is called from some other places in code, but have no idea why it's
> needed.

That was not only unneeded, but buggy - the config directory and the
socket file arguments could be non-existent. I removed it 10 days ago.

> 3. When specifying SmProgram value, you should properly handle the case
> when argv[0] does not contain path (i.e., when Geany is resolved using
> PATH).  If argv[0] does not contain path, tm_get_real_path() returns
> NULL for it on my system, causing a segfault.

That was also fixed, and the description of tm_get_real_path() has been
changed - it said that "a reasonable guess is returned even if the
file does not exist". :-)

(On that note, I don't think it's necessary for you to try guessing the
absolute name of args[0], every program I've seen just stores argv[0]

There are some other fixes, I can send a patch against 5064 if you want.

E-gards: Jimmy

More information about the Devel mailing list