Hi folks,
good news today:
I just removed the code for handling the FIFO to detect a running instance. It never worked as it should and as I imagined it.
Now, we use Unix Domain Sockets. So, the annoying dialog after a crash isn't necessary anymore. Geany detects whether an instance is running and if not, it starts a new one. If an instance is running, it opens all files specified on the command line within this instance, deiconifies the window and gets the focus to the running instance.
There is no real difference in using Geany, except that it works fine now ;-). Anyway and as usual, there might be some bugs.
The command line argument to use new instances every time changed from -p (--no-pipe) to -s (--no-socket). The socket file "geany_socket" will be created (at least on non-Windows systems) in your configuration directory.
There is one side effect in changing the code which is actually a big advantage: these sockets are also available under Windows through the Mutex system. (The code exists, but isn't tested yet. It is copied from the Sylpheed sources, thanks) Anyway, I guess it won't work at the moment and maybe it doesn't even compile on Windows. Sorry for that, I don't have a box with a running Windows at the moment.
Check out r773!
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
2006/8/30, Enrico Tröger enrico.troeger@uvena.de:
Hi folks,
good news today:
I just removed the code for handling the FIFO to detect a running instance. It never worked as it should and as I imagined it.
Now, we use Unix Domain Sockets. So, the annoying dialog after a crash isn't necessary anymore. Geany detects whether an instance is running and if not, it starts a new one. If an instance is running, it opens all files specified on the command line within this instance, deiconifies the window and gets the focus to the running instance.
That is REALLY good news!!! That dialog was really annoying (at least to me).
just out of curiosity, though: is it at all possible to have two instances running and have new files being opened in the most recent one ? (much like Firefox's behavior of "open in the most recent window")
I really think it won't be possible, and it should not be a big deal anyways. Just wanted to be sure, as I can't test it right now and I'm anxious, lol.
Regards, Enrico
Regards, Alexandre Moreira.
On Wed, 30 Aug 2006 15:46:05 -0300, "Alexandre Moreira" alexandream@gmail.com wrote:
Hey,
just out of curiosity, though: is it at all possible to have two instances running and have new files being opened in the most recent one ? (much like Firefox's behavior of "open in the most recent window")
Maybe it's possible but is it really useful or even necessary? I think the effort to implement it is higher than the benefit of this feature.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
2006/8/30, Enrico Tröger enrico.troeger@uvena.de:
There is one side effect in changing the code which is actually a big advantage: these sockets are also available under Windows through the Mutex system. (The code exists, but isn't tested yet. It is copied from the Sylpheed sources, thanks)
Hmmm I haven't read that before, and it is a big WOW if it does work but... can you point me anywhere to read about this way of making AF_UNIX available in Windows ? because that is just contrary to any information I was able to google for (perhaps I don't know the magic words, though).
Regards, Enrico
Regards, Alexandre Moreira.
On Wed, 30 Aug 2006 15:52:42 -0300, "Alexandre Moreira" alexandream@gmail.com wrote:
2006/8/30, Enrico Tröger enrico.troeger@uvena.de:
There is one side effect in changing the code which is actually a big advantage: these sockets are also available under Windows through the Mutex system. (The code exists, but isn't tested yet. It is copied from the Sylpheed sources, thanks)
Hmmm I haven't read that before, and it is a big WOW if it does work but... can you point me anywhere to read about this way of making AF_UNIX available in Windows ? because that is just contrary to any information I was able to google for (perhaps I don't know the magic words, though).
Please read the code completely: socket_fd_connect_unix() is only used for Unix-like systems, for Windows socket_fd_connect_inet() will be used.
And as I mentioned before, I didn't test it yet under Windows.
Have to go now, will answer more verbosely tomorrow.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
2006/8/30, Enrico Tröger enrico.troeger@uvena.de:
On Wed, 30 Aug 2006 15:52:42 -0300, "Alexandre Moreira" alexandream@gmail.com wrote:
2006/8/30, Enrico Tröger enrico.troeger@uvena.de:
There is one side effect in changing the code which is actually a big advantage: these sockets are also available under Windows through the Mutex system. (The code exists, but isn't tested yet. It is copied from the Sylpheed sources, thanks)
Hmmm I haven't read that before, and it is a big WOW if it does work but... can you point me anywhere to read about this way of making AF_UNIX available in Windows ? because that is just contrary to any information I was able to google for (perhaps I don't know the magic words, though).
Please read the code completely:
Sorry, I can't really access it here from work... they loaded a lot of firewall rules lately :(
socket_fd_connect_unix() is only used for Unix-like systems, for Windows socket_fd_connect_inet() will be used.
We will have to take a good look at this approach on using inet sockets on windows, since these XP's (and probably Vista) come with a noisy firewall these days...some users would be scared to see their IDE being flagged as trying to open an inbound connection... would sound like a backdoor or something.
And as I mentioned before, I didn't test it yet under Windows.
Have to go now, will answer more verbosely tomorrow.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
Regards, Alexandre Moreira.
On Wed, 30 Aug 2006 16:09:45 -0300, "Alexandre Moreira" alexandream@gmail.com wrote:
2006/8/30, Enrico Tröger enrico.troeger@uvena.de:
On Wed, 30 Aug 2006 15:52:42 -0300, "Alexandre Moreira" alexandream@gmail.com wrote:
2006/8/30, Enrico Tröger enrico.troeger@uvena.de:
There is one side effect in changing the code which is actually a big advantage: these sockets are also available under Windows through the Mutex system. (The code exists, but isn't tested yet. It is copied from the Sylpheed sources, thanks)
Hmmm I haven't read that before, and it is a big WOW if it does work but... can you point me anywhere to read about this way of making AF_UNIX available in Windows ? because that is just contrary to any information I was able to google for (perhaps I don't know the magic words, though).
Please read the code completely:
Sorry, I can't really access it here from work... they loaded a lot of firewall rules lately :(
socket_fd_connect_unix() is only used for Unix-like systems, for Windows socket_fd_connect_inet() will be used.
We will have to take a good look at this approach on using inet sockets on windows, since these XP's (and probably Vista) come with a noisy firewall these days...some users would be scared to see their IDE being flagged as trying to open an inbound connection... would sound like a backdoor or something.
Wow, does this firewall really block/filter such local ports? But firstly the code should compile and run under Windows. Let's see what happens then ;-).
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
2006/8/31, Enrico Tröger enrico.troeger@uvena.de: [...]
Wow, does this firewall really block/filter such local ports? But firstly the code should compile and run under Windows. Let's see what happens then ;-).
Well, my fault. I didn't find the nightly svn snapshot in the page earlier, and spoke without actually reading the code. I now find it unlikely that the windows firewall would block a LOOPBACK listening socket but.. hey... it IS windows. I don't really put my money on any bet that they tested their network firewall thorougly. Let's see what happens.
Unfortunately I can't test it right now, living with my girl now, and her computer, as of now, has no C development toolchain (she's into delphi these days...) and mine is completely diassembled in some box.
Whenever I have a C toolchain ready in her windows I'll give it a try... probably just after the exams at college.
Regards, Alexandre Moreira.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key
Geany mailing list Geany@uvena.de http://uvena.de/cgi-bin/mailman/listinfo/geany
On Thu, 31 Aug 2006 17:18:57 +0200, Enrico Tröger enrico.troeger@uvena.de wrote:
On Wed, 30 Aug 2006 16:09:45 -0300, "Alexandre Moreira" alexandream@gmail.com wrote:
2006/8/30, Enrico Tröger enrico.troeger@uvena.de:
On Wed, 30 Aug 2006 15:52:42 -0300, "Alexandre Moreira" alexandream@gmail.com wrote:
2006/8/30, Enrico Tröger enrico.troeger@uvena.de:
There is one side effect in changing the code which is actually a big advantage: these sockets are also available under Windows through the Mutex system. (The code exists, but isn't tested yet. It is copied from the Sylpheed sources, thanks)
Hmmm I haven't read that before, and it is a big WOW if it does work but... can you point me anywhere to read about this way of making AF_UNIX available in Windows ? because that is just contrary to any information I was able to google for (perhaps I don't know the magic words, though).
Please read the code completely:
Sorry, I can't really access it here from work... they loaded a lot of firewall rules lately :(
socket_fd_connect_unix() is only used for Unix-like systems, for Windows socket_fd_connect_inet() will be used.
We will have to take a good look at this approach on using inet sockets on windows, since these XP's (and probably Vista) come with a noisy firewall these days...some users would be scared to see their IDE being flagged as trying to open an inbound connection... would sound like a backdoor or something.
Wow, does this firewall really block/filter such local ports? But firstly the code should compile and run under Windows. Let's see what happens then ;-).
Yestderday I got my laptop with a running Windows back and today I got the socket running under Windows(wasn't much work). It seems to work, even under Windows XP with enabled firewall. But I didn't test it very well.
And Alexandre, if you succeed in learning about DDE, I'd give it a try although the socket code seems to work.
Regards, Enrico
-- Get my GPG key from http://www.uvena.de/pub.key