chiark / gitweb /
*** empty log message ***
[sympathy.git] / apps / sympathy.c
index 23398535369ae2a45c89c41eb9c15fc0cac7e6e1..5e52062442c4be7864ed8bac9b9400dccd464e47 100644 (file)
@@ -11,6 +11,12 @@ static char rcsid[] =
 
 /*
  * $Log$
+ * Revision 1.26  2008/02/29 14:55:09  james
+ * *** empty log message ***
+ *
+ * Revision 1.25  2008/02/28 22:43:25  james
+ * *** empty log message ***
+ *
  * Revision 1.24  2008/02/28 22:00:42  james
  * *** empty log message ***
  *
@@ -486,7 +492,7 @@ main (int argc, char *argv[])
 
       if ((size.y > VT102_MAX_ROWS) || (size.y < 1))
         fatal_moan ("-w requires a height between 1 and %d\n",
-                    VT102_MAX_COLS);
+                    VT102_MAX_ROWS);
 
     }
 
@@ -495,14 +501,6 @@ main (int argc, char *argv[])
       /*nochdir incase socket is relative path, unlink then will fail */
       daemon (1, 0);
 
-      /*Tell our parent's parent what our pid is */
-      if (csnok)
-        {
-          pid = getpid ();
-
-          write (csnok_pipe[1], &pid, sizeof (pid));
-          close (csnok_pipe[1]);
-        }
     }
 
 
@@ -522,6 +520,16 @@ main (int argc, char *argv[])
        }
 
       server_socket = socket_listen (oargs['k']);
+
+      /*Tell our parent's parent what our pid is */
+      if (csnok)
+        {
+          pid = getpid ();
+
+          write (csnok_pipe[1], &pid, sizeof (pid));
+          close (csnok_pipe[1]);
+        }
+
       if (!server_socket)
         fatal_moan ("failed to create socket %s for listening", oargs['k']);