Subject: help on ModuleSynchronous command

From: Dominik Vogt <[email-masked]>
Date: Wed, 18 Aug 1999 01:27:16 +0200

I have tried to write the command that Dan suggested,
but I don't know my way around with all these pipes
and file descriptors. Basically I copied the code
from MyNextXEvent into module_interface.c and modified
HandleModuleInput to watch out for "FINISHED_STARTUP"
fro the module. It worked faily well al long as I had
dozens of debug fprintf's in the code, but after I removed
the it fails miserably. It doesn't work during startup.
When fvwm is up and running it works the first time I
call it manually, but all further attempts fail too.
Could someone with a better idea of this pipe stuff
take a look at this, please?

The intended setup is to have something like

  + ModuleSynchronous Timeout 5 FvwmTheme

as the first line in the Init/RestartFunction.

BTW, whatever the manpage says, the only module sending
that string back is FvwmTheme for the moment.

Bye

Dominik ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Wed, 18 Aug 1999 21:27:44 -0400

> take a look at this, please?

I think the return code out of do_execute_module can get
changed by this logic:

      for(i=6;i<nargs;i++)
	{
	  if(args[i] != 0)
	    free(args[i]);
	}

so that later on, when it returns "i", it doesn't represent the pipe
you want to read on.

(I haven't done any testing yet.)

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 19 Aug 1999 03:48:37 +0200

> so that later on, when it returns "i", it doesn't represent the pipe

Yup, thanks, that did the trick. ModuleSynchronous works as expected
now.

Bye

Dominik ^_^