Changeset f11262 in git


Ignore:
Timestamp:
Jul 28, 1999, 2:42:51 PM (25 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
f2764078b6449847a2d681550eaba43acf75679a
Parents:
8a0ba837004057a6d7355c444061c871cae2a03d
Message:
*hannes: avoid using localhost for rsh/remsh/ssh


git-svn-id: file:///usr/local/Singular/svn/trunk@3374 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/sing_mp.cc

    r8a0ba8 rf11262  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: sing_mp.cc,v 1.23 1998-11-09 15:43:05 obachman Exp $ */
     4/* $Id: sing_mp.cc,v 1.24 1999-07-28 12:42:51 Singular Exp $ */
    55
    66/*
     
    7676      }
    7777    }
    78    
     78
    7979    *argc = i;
    8080    if (i>0)
     
    101101    FreeL(s2);
    102102  }
    103  
     103
    104104}
    105105
     
    114114                  "--MPfile", "/tmp/mpout"};
    115115  char *mode;
    116  
     116
    117117  MP_Link_pt link = NULL;
    118  
     118
    119119  if (flag == SI_LINK_OPEN)
    120120  {
     
    126126  if (l->name[0] != '\0') argv[5] = l->name;
    127127  else l->name = mstrdup(argv[5]);
    128    
     128
    129129
    130130  if (flag == SI_LINK_READ)
     
    182182  if (host == NULL) mainGetSingOptionValue("--MPhost", &host);
    183183
    184   if (port != NULL) 
     184  if (port != NULL)
    185185    argv[5] = port;
    186186  if (host != NULL)
     
    188188  else
    189189    argv[7] = mp_Env->thishost;
    190    
     190
    191191  return MP_OpenLink(mp_Env, 8, argv);
    192192}
     
    194194static MP_Link_pt slOpenMPListen(int n_argc, char **n_argv)
    195195{
    196   char *argv[] = {"--MPtransp", "TCP", "--MPmode", "listen", 
     196  char *argv[] = {"--MPtransp", "TCP", "--MPmode", "listen",
    197197                  "--MPport", "1025"};
    198198  char *port = IMP_GetCmdlineArg(n_argc, n_argv, "--MPport");
     
    208208{
    209209  char *argv[] = {"--MPtransp", "TCP", "--MPmode", "launch",
    210                   "--MPhost", "localhost", 
     210                  "--MPhost", "localhost",
    211211                  "--MPapplication", "Singular -bq  --no-warn --no-out --no-rc",
    212212                  "--MPrsh", "rsh"};
     
    218218  int argc = 8;
    219219
    220   if (appl == NULL && (host == NULL || 
     220  if (appl == NULL && (host == NULL ||
    221221                       strcmp(host, "localhost") == 0))
    222222  {
    223223    appl = feGetExpandedExecutable();
    224    
     224
    225225    if (appl != NULL)
    226226    {
     
    231231    }
    232232  }
    233  
    234   if (host == NULL)
     233
     234  if ((host == NULL)||(strcmp(host, "localhost") == 0))
    235235  {
    236236    argv[5] = mp_Env->thishost;
     
    239239    argv[5] = host;
    240240
    241   if (appl != NULL) 
     241  if (appl != NULL)
    242242    argv[7] = appl;
    243243
     
    262262  if (port != NULL) argv[5] = port;
    263263
    264   link = MP_OpenLink(mp_Env, 6, argv);   
     264  link = MP_OpenLink(mp_Env, 6, argv);
    265265  if (link != NULL)
    266266  {
     
    291291}
    292292
    293    
    294                                
     293
     294
    295295static BOOLEAN slOpenMPTcp(si_link l, short flag)
    296296{
     
    298298  char **argv;
    299299  int argc;
    300  
     300
    301301  GetCmdArgs(&argc, &argv, l->name);
    302  
     302
    303303  if (mp_Env == NULL)
    304304    mp_Env = MP_InitializeEnv(MP_AllocateEnv());
     
    324324
    325325  FreeCmdArgs(argc, argv);
    326  
     326
    327327  if (link != NULL)
    328328  {
     
    355355  }
    356356
    357   // take care of the remaining leftv's 
     357  // take care of the remaining leftv's
    358358  while (next != NULL)
    359359  {
     
    506506#endif
    507507
    508  
     508
    509509int Batch_do(const char* port, const char* host)
    510510{
Note: See TracChangeset for help on using the changeset viewer.