|
From: Olivier C. <oli...@fr...> - 2001-02-23 09:23:18
|
Andre Goeree wrote:
>
> ----- Forwarded message from Andre Goeree <abg...@uw...> -----
>
> Subject: Re: No more FvwmScript-ThemesCenter: exit!
> From: Andre Goeree <abg...@uw...>
> To: Olivier Chapuis <oli...@fr...>
> Date: Thu, 22 Feb 2001 20:37:52 +0100
>
> On Thu, Feb 22, 2001 at 04:30:29PM +0100, Olivier Chapuis wrote:
> >
> > First experience: start one of the above FvwmScript. You should
> > see a .tpm-com-lock-"script_name"-pidnum pipe. Can you check if
> > the pidnum is good: is this pidnum the pid of the FvwmScript you
> > start?
> > If no we have found the bug and you do not need to do the second
> > experience.
>
> I believe we have found it :-)
>
Yes
> ago@mandark$ ls -a ~/.fvwm/.tmp-com-*
> .tmp-com-lock-script-16049
>
> And "ps" gives:
> 16047 /home/ago/sys/fvwm/libexec/fvwm/2.3.29/FvwmScript ...
>
The commands use by the FvwmScript scripts to found the pid
is:
Set $cmd = {perl -e '$t=getppid; print $t . "\n"'}
Set $pid = (GetOutput $cmd 1 -1)
FvwmScript use popen (and fread) to get the output.
It seems that on Andre machine the following happen:
FvwmScript -> a shell run by popen -> perl cmd
so the $pid is the pid a of shell run by popen. However,
on our Linux machine the shell is hidden so perl return
the "correct" parent pid. The problem can came from a lot
of place:
- the libc (Andre what is your(/bsd) libc?)
- perl implementation
- os process implementation
Really no idea.
Mikhael do you have an idea to fix this? We can go back
to the ps command and try to use it in a POSFIX way (or
use some "if (linux) then ... else if (bds) ...").
I've done a Test FvwmScript attached to this message,
to do some tests. Andre can you run it. On my machine
the first two pid are the FvwmScript pid and the 3rd
is the init pid (1). There are almost no hope that the
second pid number will solve our problems.
Regards, Olivier |