Usermode/GUI Terminal - Renamed folder
[tpg/acess2.git] / Usermode / Applications / init_src / main.c
index 87eccde..1a609ac 100644 (file)
@@ -252,7 +252,6 @@ int ProcessInittab(const char *Path)
                                goto lineError;
                        }
                        AddKTerminal(id, command);
-                       free(command);
                }
                else if(strcmp(cmdbuf, "stty") == 0 ) {
                        // stty <devpath> [78][NOE][012][bB]<baud> <command...>
@@ -290,7 +289,7 @@ int ProcessInittab(const char *Path)
                        if(!command)
                                goto lineError;
 
-                       int handles[] = {0, 1, 2};
+                       int handles[] = {0, 1, 1};
                        int pid = _SysSpawn(command[0], (const char **)command, NULL, 3, handles, NULL);
                        int retstatus;
                        _SysWaitTID(pid, &retstatus);
@@ -427,7 +426,7 @@ int SpawnCommand(int c_stdin, int c_stdout, int c_stderr, char **ArgV)
 
 int SpawnKTerm(tInitProgram *Program)
 {
-       const char fmt[] = "/Devices/VTerm/%i";
+       const char fmt[] = "/Devices/pts/vt%i";
        char    path[sizeof(fmt)];
        
        snprintf(path, sizeof(path), fmt, Program->TypeInfo.KTerm.ID);
@@ -444,7 +443,7 @@ int SpawnSTerm(tInitProgram *Program)
         int    out = _SysOpen(Program->TypeInfo.STerm.Path, OPENFLAG_WRITE);
 
        if(in == -1 || out == -1 ) {
-               _SysDebug("Unable to open serial '%s' for '%s'", Program->TypeInfo.STerm.Path, Program->Command);
+               _SysDebug("Unable to open serial port '%s'", Program->TypeInfo.STerm.Path);
                return -1;
        }
 

UCC git Repository :: git.ucc.asn.au