On Sat, 6 Dec 2008 14:40:47 -0400 "Brendan MacDonell" <[EMAIL PROTECTED]> wrote:
> On Sat, Dec 6, 2008 at 2:20 PM, Guillaume Quintin > <[EMAIL PROTECTED]> wrote: > > I just tried the close(0) patch but it does not change anything. > > And I found something very weird. I told you that in the previous > > version of dwm (5.2) with the .xinitrc containing the "while | dwm" > > all worked fine and I am sure of that. I quitted dwm-5.2 many times > > with a lot of openned windows and all worked fine. But now, when I > > reinstall dwm-5.2 I get the same problem than in dwm-5.3 and > > dwm-5.3.1, "double-fork", "simple-fork" and re-"double-fork". I > > don't understand why. > > Is there any chance you may have recently updated your version of > xorg-server? I know the change just got pushed out recently on > Archlinux, and it seems to have changed some corner cases that people > previously took for granted. > > > In response to your idea for executing status scripts, that's roughly > how my patched version of dwm does it, though mine takes the status > script name (or possibly even the content) as an argument, and stores > the entirety of argv so that dwm can re-exec itself to restart/change > the script. In any case, the function you're looking for to replace a > fid with another is 'dup2(replacement, to_replace)'. > > On Sat, Dec 6, 2008 at 2:20 PM, Guillaume Quintin > <[EMAIL PROTECTED]> wrote: > > I just tried the close(0) patch but it does not change anything. > > And I found something very weird. I told you that in the previous > > version of dwm (5.2) with the .xinitrc containing the "while | dwm" > > all worked fine and I am sure of that. I quitted dwm-5.2 many times > > with a lot of openned windows and all worked fine. But now, when I > > reinstall dwm-5.2 I get the same problem than in dwm-5.3 and > > dwm-5.3.1, "double-fork", "simple-fork" and re-"double-fork". I > > don't understand why. > > > > Why don't we change the way dwm gets its status text ? For example > > we could use the SIGALRM signal to call a "spawn2" : > > > > spawn2() > > { > > check for a certain shell script ".dwmstatus"; > > if it is not present then return; > > create some pipe p[]; > > (double or simple)-fork; > > in the child process > > { > > close(0); > > close(1); > > close(2); > > set stdout to p[1]; /* I don't know how exactly */ > > execv(".dwmstatus"); > > } > > /* Here is dwm */ > > read status from p[0]; > > display status; > > } > > > > This will take only a few LOC, because all the reading p[0] part > > will be in fact the reading-stdin code from the run() function which > > will not be needed anymore. This has the advantages that one can > > change the status when dwm is running and there are no more > > "quitting" problem. This is just an idea, forgive me not to propose > > some real code. Well tell me what you think of this idea. > > > > -- > > Kind regards, > > Guillaume Quintin. > > > > > Yes I pacmaned a new xorg-server and I move from 32 bits to 64 bits recently. -- Kind regards, Guillaume Quintin.