[BACK]Return to ox_launch.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / io

Diff for /OpenXM_contrib2/asir2000/io/ox_launch.c between version 1.10 and 1.13

version 1.10, 2000/11/08 06:21:17 version 1.13, 2001/06/27 09:14:08
Line 44 
Line 44 
  * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY   * OF THE SOFTWARE HAS BEEN DEVELOPED BY A THIRD PARTY, THE THIRD PARTY
  * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,   * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE,
  * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.   * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE.
  * $OpenXM: OpenXM_contrib2/asir2000/io/ox_launch.c,v 1.9 2000/11/07 09:31:36 noro Exp $   * $OpenXM: OpenXM_contrib2/asir2000/io/ox_launch.c,v 1.12 2001/06/06 02:21:40 noro Exp $
 */  */
 #include <setjmp.h>  #include <setjmp.h>
 #include <signal.h>  #include <signal.h>
Line 82  static int ox_io_init(int);
Line 82  static int ox_io_init(int);
 static void push_one(Obj);  static void push_one(Obj);
 static Obj pop_one();  static Obj pop_one();
 static void do_cmd(int);  static void do_cmd(int);
   static void terminate_server();
   
 static Obj *asir_OperandStack;  static Obj *asir_OperandStack;
 static int asir_OperandStackPtr;  static int asir_OperandStackPtr;
Line 184  char **argv;
Line 185  char **argv;
 #if defined(SIGUSR1)  #if defined(SIGUSR1)
         signal(SIGUSR1,SIG_IGN);          signal(SIGUSR1,SIG_IGN);
 #endif  #endif
   #if defined(SIGTERM)
           signal(SIGTERM,terminate_server);
   #endif
   
         if ( accept_client ) {          if ( accept_client ) {
                 cs = try_bind_listen(use_unix,control_port_str);                  cs = try_bind_listen(use_unix,control_port_str);
Line 353  int nolog;
Line 357  int nolog;
                                 close(i);                                  close(i);
 #endif  #endif
                 }                  }
                 if ( !strcmp(dname,"1" ) ) /* XXX: for ssh */                  if ( !nolog && !strcmp(dname,"1" ) ) /* XXX: for ssh */
                         execl(prog,prog,0);                          execl(prog,prog,0);
                 else if ( nolog || !strcmp(dname,"0") ) {                  else if ( nolog || !strcmp(dname,"0") ) {
                         FILE *null;                          FILE *null;
Line 361  int nolog;
Line 365  int nolog;
                         null = fopen("/dev/null","wb");                          null = fopen("/dev/null","wb");
                         dup2(fileno(null),1);                          dup2(fileno(null),1);
                         dup2(fileno(null),2);                          dup2(fileno(null),2);
                         if ( !nolog ) {                          if ( !strcmp(dname,"1") ) {
                                   /* XXX */
                                 putenv("DISPLAY=");                                  putenv("DISPLAY=");
                                 execl(prog,prog,0);                                  execl(prog,prog,0);
                         } else                          } else if ( strcmp(dname,"0") )
                                 execl(prog,prog,"-display",dname,0);                                  execl(prog,prog,"-display",dname,0);
                           else {
                                   putenv("DISPLAY=");
                                   execl(prog,prog,0);
                           }
                 } else                  } else
                         execl(prog,prog,"-display",dname,0);                          execl(prog,prog,"-display",dname,0);
                 /* On failure */                  /* On failure */
Line 403  static Obj pop_one() {
Line 412  static Obj pop_one() {
         if ( asir_OperandStackPtr >= 0 ) {          if ( asir_OperandStackPtr >= 0 ) {
                 return asir_OperandStack[asir_OperandStackPtr--];                  return asir_OperandStack[asir_OperandStackPtr--];
         }          }
   }
   
   static void terminate_server()
   {
           kill(cpid,SIGKILL);
           exit(0);
 }  }
   

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.13

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>