conformal / spectrwm

A small dynamic tiling window manager for X11.
ISC License
1.33k stars 97 forks source link

autorun broken in last release (2.7.0) #102

Closed panchoh closed 9 years ago

panchoh commented 9 years ago

Hi.

With the last release (2.7.0) the autorun functionality seems to be broken (at least for me).

I have in /etc/spectrwm.conf: autorun = ws[1]:urxvt

But it does not get launched anymore. Instead, an error is shown in ~/.xsession-errors: spawn: execvp: No such file or directory

Upon enabling debugging, I could see that args->argv[0] was actually empty when spawn() is called for this instance.

I traced the issue back to setautorun(). By commenting out the call to free(str), it works again.

(Of course, I know that this is not a proper fix, because then I reckon that a bit of memory is leaked)

Thought you'd like to know.

Let me know if I can help.

LordReg commented 9 years ago

Hi panchoh, This was reported on #101 and fixed with 2.7.1. The free() needed to be after spawn() since a.argv contains references to the allocated memory and it is accessed in spawn(). Thanks for the report.

panchoh commented 9 years ago

Darn, I didn't see the other report. Thanks for the fixin', and sorry for the noise!

Happy hacking,