repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 00e61c70bb0f16f661136d41a50bdfa316a04212:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 00e61c70bb0f16f661136d41a50bdfa316a04212
Author: Marc Lehmann 
Date:   Sun Oct 24 17:52:50 2010 +0000

    ptytty::init is the first thing we do in main, delay rxvt_init

diff --git a/src/main.C b/src/main.C
index d6c157f262afcffc782afa9ccb0be0792d12e379..
index ..6f9f9712a15b44dd2dbec0500b08c73b72342cf7 100644
--- a/src/main.C
+++ b/src/main.C
@@ -556,8 +556,6 @@ rxvt_init ()
   dup2 (STDERR_FILENO, STDIN_FILENO);
   dup2 (STDERR_FILENO, STDOUT_FILENO);

-  ptytty::init ();
-
   if (!ev_default_loop ())
     rxvt_fatal ("cannot initialise libev (bad value for LIBEV_METHODS?)\n");

diff --git a/src/rxvt.C b/src/rxvt.C
index 12de6f8855b5a3b7ba42b1204212399887986b8b..
index ..54c2a3e6192b10f53b967069e9b9247e9df68b1d 100644
--- a/src/rxvt.C
+++ b/src/rxvt.C
@@ -30,6 +30,7 @@ int
 main (int argc, const char *const *argv)
 try
   {
+    ptytty::init ();
     rxvt_init ();

     rxvt_term *t = new rxvt_term;
diff --git a/src/rxvtd.C b/src/rxvtd.C
index 48de278a3569fea4bad99190665edb4d811272f0..
index ..2d23d1dec21f2e47e37c1275bec6bb8587ba9e07 100644
--- a/src/rxvtd.C
+++ b/src/rxvtd.C
@@ -227,13 +227,13 @@ void server::read_cb (ev::io &w, int revents)
 int
 main (int argc, const char *const *argv)
 {
+  ptytty::init ();
+
   int opt_fork, opt_opendisplay, opt_quiet;
 #if ENABLE_MLOCK
   int opt_lock;
 #endif

-  rxvt_init ();
-
   for (int i = 1; i < argc; i++)
     {
       if (!strcmp (argv [i], "-f") || !strcmp (argv [i], "--fork"))
@@ -253,6 +253,8 @@ main (int argc, const char *const *argv)
         }
     }

+  rxvt_init ();
+
   // optionally open display and never release it.
   if (opt_opendisplay)
     if (const char *dpy = getenv ("DISPLAY"))

-----END OF PAGE-----