unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* print a warning when starting Gtk+ emacs in daemon mode
@ 2011-05-31  7:00 Dan Nicolaescu
  2011-05-31 12:01 ` Juanma Barranquero
  2011-05-31 13:05 ` Stefan Monnier
  0 siblings, 2 replies; 6+ messages in thread
From: Dan Nicolaescu @ 2011-05-31  7:00 UTC (permalink / raw)
  To: emacs-devel


We get many duplicate bug reports of Gtk+ emacs crashing when run in
daemon mode and the X11 connection dies.

How about printing a warning when starting Gtk+ emacs in daemon mode so
that the users are aware of the potential risks (and blame Gtk+ not
emacs ...)

OK?

=== modified file 'src/emacs.c'
--- src/emacs.c   2011-05-31 05:12:19 +0000
+++ src/emacs.c   2011-05-31 06:42:45 +0000
@@ -1002,6 +1002,11 @@ main (int argc, char **argv)
   }
 
 #ifndef NS_IMPL_COCOA
+#ifdef USE_GTK
+      fprintf (stderr, "Warning: due a long standing Gtk+ bug\nhttp://bugzilla.gnome.org/show_bug.cgi?id=85715\n\
+Emacs might crash when run in deamon mode and the X11 connection is unexpectedly lost.\n\
+Using an Emacs configured with --with-x-toolkit=lucid does not have this problem.");
+#endif
       f = fork ();
 #else /* NS_IMPL_COCOA */
       /* Under Cocoa we must do fork+exec as CoreFoundation lib fails in


[Improvements for the warning text are more than welcome]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: print a warning when starting Gtk+ emacs in daemon mode
  2011-05-31  7:00 print a warning when starting Gtk+ emacs in daemon mode Dan Nicolaescu
@ 2011-05-31 12:01 ` Juanma Barranquero
  2011-05-31 13:05 ` Stefan Monnier
  1 sibling, 0 replies; 6+ messages in thread
From: Juanma Barranquero @ 2011-05-31 12:01 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> How about printing a warning when starting Gtk+ emacs in daemon mode so
> that the users are aware of the potential risks (and blame Gtk+ not
> emacs ...)

There's no downside to it.

> +Emacs might crash when run in deamon mode and the X11 connection is unexpectedly lost.\n\

s/deamon/daemon/

    Juanma



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: print a warning when starting Gtk+ emacs in daemon mode
  2011-05-31  7:00 print a warning when starting Gtk+ emacs in daemon mode Dan Nicolaescu
  2011-05-31 12:01 ` Juanma Barranquero
@ 2011-05-31 13:05 ` Stefan Monnier
  2011-05-31 14:00   ` Dan Nicolaescu
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2011-05-31 13:05 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> We get many duplicate bug reports of Gtk+ emacs crashing when run in
> daemon mode and the X11 connection dies.

> How about printing a warning when starting Gtk+ emacs in daemon mode so
> that the users are aware of the potential risks (and blame Gtk+ not
> Emacs ...)

We already print a blurb when the connection dies.  Presumably it gets
printed to the same place as your patch would, so if they don't see the
one we already have, they probably won't see the one you suggest.


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: print a warning when starting Gtk+ emacs in daemon mode
  2011-05-31 13:05 ` Stefan Monnier
@ 2011-05-31 14:00   ` Dan Nicolaescu
  2011-05-31 15:05     ` Stefan Monnier
  0 siblings, 1 reply; 6+ messages in thread
From: Dan Nicolaescu @ 2011-05-31 14:00 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> We get many duplicate bug reports of Gtk+ emacs crashing when run in
>> daemon mode and the X11 connection dies.
>
>> How about printing a warning when starting Gtk+ emacs in daemon mode so
>> that the users are aware of the potential risks (and blame Gtk+ not
>> Emacs ...)
>
> We already print a blurb when the connection dies.  Presumably it gets
> printed to the same place as your patch would, so if they don't see the
> one we already have, they probably won't see the one you suggest.

A very likely scenario:
1. user starts emacs --daemon
2. some time later starts an ssh connection to the machine and opens an
X11 frame, the terminal that started emacs --daemon is long unavailable
3. if the ssh connection has a problem, then trying to print a message there won't work

What is the downside of printing a message at startup, where it is most
likely to be seen?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: print a warning when starting Gtk+ emacs in daemon mode
  2011-05-31 14:00   ` Dan Nicolaescu
@ 2011-05-31 15:05     ` Stefan Monnier
  2011-06-02 16:58       ` Dan Nicolaescu
  0 siblings, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2011-05-31 15:05 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

>>> We get many duplicate bug reports of Gtk+ emacs crashing when run in
>>> daemon mode and the X11 connection dies.
>>> How about printing a warning when starting Gtk+ emacs in daemon mode so
>>> that the users are aware of the potential risks (and blame Gtk+ not
>>> Emacs ...)
>> We already print a blurb when the connection dies.  Presumably it gets
>> printed to the same place as your patch would, so if they don't see the
>> one we already have, they probably won't see the one you suggest.

> A very likely scenario:
> 1. user starts emacs --daemon
> 2. some time later starts an ssh connection to the machine and opens an
>   X11 frame, the terminal that started emacs --daemon is long unavailable
> 3. if the ssh connection has a problem, then trying to print a message
>   there won't work

OK.

> What is the downside of printing a message at startup, where it is most
> likely to be seen?

I don't know if there could be a significant downside, tho I do expect
that most daemon users only use Emacs with a single X11 display.
So I'm OK with such a message (presuming it won't introduce any real
problem), but please try to make the message less scary and making it
clear that it only applies to the case of multiple displays.


        Stefan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: print a warning when starting Gtk+ emacs in daemon mode
  2011-05-31 15:05     ` Stefan Monnier
@ 2011-06-02 16:58       ` Dan Nicolaescu
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Nicolaescu @ 2011-06-02 16:58 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>>> We get many duplicate bug reports of Gtk+ emacs crashing when run in
>>>> daemon mode and the X11 connection dies.
>>>> How about printing a warning when starting Gtk+ emacs in daemon mode so
>>>> that the users are aware of the potential risks (and blame Gtk+ not
>>>> Emacs ...)
>>> We already print a blurb when the connection dies.  Presumably it gets
>>> printed to the same place as your patch would, so if they don't see the
>>> one we already have, they probably won't see the one you suggest.
>
>> A very likely scenario:
>> 1. user starts emacs --daemon
>> 2. some time later starts an ssh connection to the machine and opens an
>>   X11 frame, the terminal that started emacs --daemon is long unavailable
>> 3. if the ssh connection has a problem, then trying to print a message
>>   there won't work
>
> OK.
>
>> What is the downside of printing a message at startup, where it is most
>> likely to be seen?
>
> I don't know if there could be a significant downside, tho I do expect
> that most daemon users only use Emacs with a single X11 display.
> So I'm OK with such a message (presuming it won't introduce any real
> problem), but please try to make the message less scary and making it
> clear that it only applies to the case of multiple displays.

Not sure what you mean here...
So please adjust the warning to make it less scary.  (although not too
much, as we do want users to complain about Gtk, not emacs...)



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-06-02 16:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-31  7:00 print a warning when starting Gtk+ emacs in daemon mode Dan Nicolaescu
2011-05-31 12:01 ` Juanma Barranquero
2011-05-31 13:05 ` Stefan Monnier
2011-05-31 14:00   ` Dan Nicolaescu
2011-05-31 15:05     ` Stefan Monnier
2011-06-02 16:58       ` Dan Nicolaescu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).