[Geany] The way we handle the FIFO.

Alexandre Moreira alexandream at xxxxx
Mon Jul 24 16:11:26 UTC 2006


Hello, everyone.

I've been thinking about some stuff these days, and I'd like to see what you
think about it. I didn't give it much thought yet, so it may be that someone
will readily point out why it is not a good idea and move on, so I decided
to post before giving any deeper research to the problem.

Right now, whenever the user opens a new empty instance of geany, geany
checks out to see if the FIFO exists, and if it does, it asks the user what
to do, if it should skip launching or if it should delete the pipe and open.

But I think asking the user is rather annoying, and would like to give Geany
the ability to try to connect to the pipe, send a ping message wait for,
say, 3 or 5 seconds (enough time for a process to reply a pipe ping message)
and if it doesnt reply, deletes the pipe and runs itsel. If it does reply,
we skip launching and raise the old instance.

Of course we would be trading the annoyance of asking the user for the
annoyance of the time spent in the ping wait, and adding more code to the
base (which could have its own bugs). But I think the code increase is not
really significant (a select() could do it, in posix at least) and the time
the user would take to read and answer the message box would be pretty much
the same that Geany would take to check if the pipe is "alive".

I am still in doubt wether this can be achieved easily in windows (I remind
reading somewhere last week that windows' select() only applies to winsocks
file descriptors...bummer) and don't know what you guys think of it, hence I
did not do any work on this matter.

Regards,
Alexandre Moreira.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/users/attachments/20060724/9bd66bff/attachment.html>


More information about the Users mailing list