Fixed env vars and paths for the unix socket.
--- a/main.c Mon Sep 24 14:00:06 2007 +0200
+++ b/main.c Mon Sep 24 14:14:30 2007 +0200
@@ -34,8 +34,8 @@
version);
printf("usage: %s [opts] [appcommand] [param1] [param2] ...\n", pname);
printf(" If you give _appcommand_, it starts the application and\n");
- printf(" serves it through a Unix socket on $SM_SOCKET or "
- "/tmp/socket-sm.UID,\n");
+ printf(" serves it through a Unix socket on $TM_SOCKET or "
+ "/tmp/tm-socket.UID,\n");
printf(" unless '-p' is used.\n");
printf(" Without _appcomand_, starts a the Unix socket client.\n");
printf("options: \n");
--- a/server.c Mon Sep 24 14:00:06 2007 +0200
+++ b/server.c Mon Sep 24 14:14:30 2007 +0200
@@ -69,13 +69,6 @@
app_control_start();
- child = fork_app(command_line.s_param.command);
-
- if (command_line.s_param.run_in_subterminal)
- prepare_user_terminal();
-
- install_signal_forwarders(child);
-
/* in raw mode, the signals for Control-C, ... will be generated by the
* slave pty. The master will receive the key codes. */
if (command_line.s_param.serve_unix)
@@ -84,6 +77,13 @@
if (command_line.s_param.serve_tcp)
s_tcp_update_served(command_line.s_param.max_served);
+ child = fork_app(command_line.s_param.command);
+
+ if (command_line.s_param.run_in_subterminal)
+ prepare_user_terminal();
+
+ install_signal_forwarders(child);
+
loop();
if (command_line.s_param.serve_unix)
--- a/unix_server.c Mon Sep 24 14:00:06 2007 +0200
+++ b/unix_server.c Mon Sep 24 14:14:30 2007 +0200
@@ -17,13 +17,13 @@
static char *socket_path = 0;
-static char default_path_prefix[] = "/tmp/mt-socket.";
+static char default_path_prefix[] = "/tmp/tm-socket.";
void get_unix_path()
{
char *new;
- new = getenv("SM_SOCKET");
+ new = getenv("TM_SOCKET");
if (new == 0) /* Compose the path from the default values */
{
char num[20]; /* enough for an int */