IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42919


Ignore:
Timestamp:
Sep 2, 2025, 10:09:16 AM (11 months ago)
Author:
eugene
Message:

do not save pcontrol or pclient history to internal buffer; free "realhost" when freeing a job

Location:
trunk/Ohana/src/opihi
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/lib.shell/opihi.c

    r40652 r42919  
    44int opihi (int argc, char **argv) {
    55
    6   int Nbad;
    76  char *line, *prompt, *history;
    87  pid_t ppid;
     
    1514  welcome ();
    1615
    17   Nbad = 0;
     16  // if HISTORY is defined, and does not have the value NONE, save history
     17  int SaveHistory = TRUE;
     18  if (!history || !strcasecmp(history, "none")) { SaveHistory = FALSE; }
     19
     20  int Nbad = 0;
    1821  while (1) {  /** must exit with command "exit" or "quit" */
    1922    if (Nbad == 10) exit (20);
     
    4043    if (*line) {
    4144      multicommand (line);
    42       add_history (line);
     45      if (SaveHistory) { add_history (line); }
    4346
    4447// the libedit version of readline does not support an incremental write to history file
    4548# ifdef RL_READLINE_VERSION
    46       if (history != NULL) append_history (1, history);
     49      if (SaveHistory) { append_history (1, history); }
    4750# endif
    4851
  • trunk/Ohana/src/opihi/pclient/pclient.c.in

    r39457 r42919  
    44# define opihi_prompt "pclient: "
    55# define opihi_description "pcontrol client shell\n"
    6 # define opihi_history ""
     6# define opihi_history "NONE"
    77# define opihi_rcfile ".pcontrolrc"
    88
  • trunk/Ohana/src/opihi/pcontrol/JobOps.c

    r39457 r42919  
    270270
    271271  FREE (job[0].hostname);
     272  FREE (job[0].realhost);
    272273  for (i = 0; i < job[0].argc; i++) {
    273274    FREE (job[0].argv[i]);
  • trunk/Ohana/src/opihi/pcontrol/pcontrol.c.in

    r42389 r42919  
    66# define opihi_prompt "pcontrol: "
    77# define opihi_description "pcontrol client shell\n"
    8 # define opihi_history ".pcontrol"
     8# define opihi_history "NONE"
    99# define opihi_rcfile ".pcontrolrc"
    1010
Note: See TracChangeset for help on using the changeset viewer.