Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Some kind of daemon?

Moderators: larsivi kris

Posted: 08/07/07 08:59:39

I'm trying to make a GUI that can display both opengl windows and/or terminal windows (using ncurses). So one could start the program using a terminal (using ./test -console for example) at work. But later when I get home I would like a opengl window so I write ./test -opengl , and the same instance of the program that was used for the console would pop up with all the bells and whistles for opengl. The problem is that I don't really know how to do it. Should I make a daemon that guis connect to? Is there any way to find the pid and communicate with the instance using tango? Or is there another more clever way? Tango is great btw.

//With regards Daniel Swe.

Author Message

Posted: 08/07/07 15:25:17

From your message, I assume that you're restricting yourself to Windows. If so, I think your best option is to write the backend of your application as a Windows service and connect to it from the frontend using a pipe or a socket. There are several examples of how to create a Windows service all over the web and there is even a set of classes for D in the scrapple project at DSource (see bevutils).

If you want to do this for Linux/Unix let me know and I'll give you some additional pointers.

Posted: 08/08/07 21:39:36

The linux pointers please! :) Using Ubuntu Gutsy right now.