IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12840 for trunk/Ohana/src


Ignore:
Timestamp:
Apr 17, 2007, 9:59:02 AM (19 years ago)
Author:
eugene
Message:

various fixes to support Mac OS X

Location:
trunk/Ohana/src
Files:
11 added
4 deleted
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/include/addstar.h

    r12749 r12840  
    8282int     ACCEPT_ASTROM;  // accept even bad astrometry solutions (NASTRO == 0)
    8383int     ACCEPT_MOTION;  // accept reference proper motion measurements
     84int     ACCEPT_TIME;    // accept time stamp (or 0)
     85int     NO_STARS;       // ignore the stars
    8486int     TEXTMODE;       // force input file to be loaded as RAW
    8587int     SUBPIX;         // apply a subpix correction
  • trunk/Ohana/src/addstar/src/ReadImageHeader.c

    r12732 r12840  
    2424  image[0].NY = Ny;
    2525
    26   if (!gfits_scan (header, "TZERO",   "%d",  1, &image[0].tzero)) {
     26  if (!gfits_scan (header, "TZERO",   "%d",  1, &image[0].tzero) && !ACCEPT_TIME) {
    2727    image[0].tzero = parse_time (header);
    2828  }
     
    155155
    156156  /* find expected number of stars */
    157   if (!gfits_scan (header, "NSTARS", "%d", 1, &image[0].nstar)) {
     157  if (!gfits_scan (header, "NSTARS", "%d", 1, &image[0].nstar) && !NO_STARS) {
    158158    fprintf (stderr, "can't get NSTARS from header\n");
    159159    return (FALSE);
  • trunk/Ohana/src/addstar/src/SetSignals.c

    r3376 r12840  
    3030  for (i = 0; i < 36; i++) {
    3131    switch (i) {
    32       /* can't redirect this signals */
    33     case SIGKILL:    /* kill -9: cannot be caught or ignored */
    34     case SIGSTOP:    /* SIGSTOP: cannot be caught or ignored */
     32      /* can't redirect these signals */
     33    case SIGKILL:    /* kill -9: cannot be caught or ignored (POSIX.1-1990) */
     34    case SIGSTOP:    /* SIGSTOP: cannot be caught or ignored (POSIX.1-1990) */
    3535      /* ignore these signals */
    36     case SIGCHLD:    /* child halted: ignore */
    37     case SIGPWR:     /* power failure - why ignore this? */
    38     case SIGWINCH:   /* window resized */
    39     case SIGCONT:    /* continue - maintain this action */
    40     case SIGTSTP:    /* stop signal sent from tty - why ignore? */
    41     case SIGURG:     /* socket signal, ignore this */
     36    case SIGCHLD:    /* child halted: ignore (POSIX.1-1990) */
     37    case SIGCONT:    /* continue - maintain this action (POSIX.1-1990) */
     38    case SIGTSTP:    /* stop signal sent from tty - why ignore? (POSIX.1-1990) */
     39    case SIGURG:     /* socket signal, ignore this (POSIX.1-2001) */
     40# ifdef (SIGPWR)
     41    case SIGPWR:     /* power failure - why ignore this? (Sys V) */
     42# endif
     43# ifdef (SIGWINCH)
     44    case SIGWINCH:   /* window resized (4.3BSD) */
     45# endif
    4246      break;
    4347     
  • trunk/Ohana/src/addstar/src/args.c

    r10937 r12840  
    242242  if ((N = get_argument (argc, argv, "-accept-motion"))) {
    243243    ACCEPT_MOTION = TRUE;
     244    remove_argument (N, &argc, argv);
     245  }
     246  /* accept bad header astrometry */
     247  ACCEPT_TIME = FALSE;
     248  if ((N = get_argument (argc, argv, "-accept-time"))) {
     249    ACCEPT_TIME = TRUE;
     250    remove_argument (N, &argc, argv);
     251  }
     252  /* skip the stars */
     253  NO_STARS = FALSE;
     254  if ((N = get_argument (argc, argv, "-no-stars"))) {
     255    NO_STARS = TRUE;
    244256    remove_argument (N, &argc, argv);
    245257  }
  • trunk/Ohana/src/delstar/src/SetSignals.c

    r4607 r12840  
    3030  for (i = 0; i < 36; i++) {
    3131    switch (i) {
    32       /* can't redirect this signals */
    33     case SIGKILL:    /* kill -9: cannot be caught or ignored */
    34     case SIGSTOP:    /* SIGSTOP: cannot be caught or ignored */
     32      /* can't redirect these signals */
     33    case SIGKILL:    /* kill -9: cannot be caught or ignored (POSIX.1-1990) */
     34    case SIGSTOP:    /* SIGSTOP: cannot be caught or ignored (POSIX.1-1990) */
    3535      /* ignore these signals */
    36     case SIGCHLD:    /* child halted: ignore */
    37     case SIGPWR:     /* power failure - why ignore this? */
    38     case SIGWINCH:   /* window resized */
    39     case SIGCONT:    /* continue - maintain this action */
    40     case SIGTSTP:    /* stop signal sent from tty - why ignore? */
    41     case SIGURG:     /* socket signal, ignore this */
     36    case SIGCHLD:    /* child halted: ignore (POSIX.1-1990) */
     37    case SIGCONT:    /* continue - maintain this action (POSIX.1-1990) */
     38    case SIGTSTP:    /* stop signal sent from tty - why ignore? (POSIX.1-1990) */
     39    case SIGURG:     /* socket signal, ignore this (POSIX.1-2001) */
     40# ifdef (SIGPWR)
     41    case SIGPWR:     /* power failure - why ignore this? (Sys V) */
     42# endif
     43# ifdef (SIGWINCH)
     44    case SIGWINCH:   /* window resized (4.3BSD) */
     45# endif
    4246      break;
    4347     
  • trunk/Ohana/src/getstar/Makefile

    r12774 r12840  
    2222dvoImageOverlaps: $(BIN)/dvoImageOverlaps.$(ARCH)
    2323dvoImageOverlaps.install: $(DESTBIN)/dvoImageOverlaps
     24
     25dvoImageExtract: $(BIN)/dvoImageExtract.$(ARCH)
     26dvoImageExtract.install: $(DESTBIN)/dvoImageExtract
    2427
    2528install: getstar.install dvoImageOverlaps.install
     
    5255$(OVERLAPS): $(INC)/dvoImageOverlaps.h
    5356$(BIN)/dvoImageOverlaps.$(ARCH): $(OVERLAPS)
     57
     58EXTRACT = \
     59$(SRC)/dvoImageExtract.$(ARCH).o         \
     60$(SRC)/ConfigInit_extract.$(ARCH).o      \
     61$(SRC)/args_extract.$(ARCH).o            \
     62$(SRC)/Shutdown.$(ARCH).o                \
     63$(SRC)/SetSignals.$(ARCH).o              \
     64$(SRC)/WriteImages.$(ARCH).o             \
     65$(SRC)/WriteImageFITS.$(ARCH).o          \
     66$(SRC)/SelectImages.$(ARCH).o       
     67
     68$(EXTRACT): $(INC)/dvoImageExtract.h
     69$(BIN)/dvoImageExtract.$(ARCH): $(EXTRACT)
  • trunk/Ohana/src/getstar/src/SetSignals.c

    r6968 r12840  
    3030  for (i = 0; i < 36; i++) {
    3131    switch (i) {
    32       /* can't redirect this signals */
    33     case SIGKILL:    /* kill -9: cannot be caught or ignored */
    34     case SIGSTOP:    /* SIGSTOP: cannot be caught or ignored */
     32      /* can't redirect these signals */
     33    case SIGKILL:    /* kill -9: cannot be caught or ignored (POSIX.1-1990) */
     34    case SIGSTOP:    /* SIGSTOP: cannot be caught or ignored (POSIX.1-1990) */
    3535      /* ignore these signals */
    36     case SIGCHLD:    /* child halted: ignore */
    37     case SIGPWR:     /* power failure - why ignore this? */
    38     case SIGWINCH:   /* window resized */
    39     case SIGCONT:    /* continue - maintain this action */
    40     case SIGTSTP:    /* stop signal sent from tty - why ignore? */
    41     case SIGURG:     /* socket signal, ignore this */
     36    case SIGCHLD:    /* child halted: ignore (POSIX.1-1990) */
     37    case SIGCONT:    /* continue - maintain this action (POSIX.1-1990) */
     38    case SIGTSTP:    /* stop signal sent from tty - why ignore? (POSIX.1-1990) */
     39    case SIGURG:     /* socket signal, ignore this (POSIX.1-2001) */
     40# ifdef (SIGPWR)
     41    case SIGPWR:     /* power failure - why ignore this? (Sys V) */
     42# endif
     43# ifdef (SIGWINCH)
     44    case SIGWINCH:   /* window resized (4.3BSD) */
     45# endif
    4246      break;
    4347     
  • trunk/Ohana/src/libdvo/include/dvo.h

    r12332 r12840  
    241241char *libdvo_version ();
    242242
     243int GetRegisteredMosaic ();
    243244int FindMosaicForImage (Image *images, int Nimages, int entry);
    244245int FindMosaicForImage_TableSearch (Image *images, int Nimages, int entry);
  • trunk/Ohana/src/libdvo/src/mosaic_astrom.c

    r5241 r12840  
    33/* chip-match table: j = ChipMatch[i], images[j] is DIS for images[i] WRP */
    44
     5static int    iDIS = -1;      // DIS entry in ChipMatch[]
    56static int    Ndis = 0;
    67static int    *DISentry = NULL;
    78static e_time *DIStzero = NULL;
    89static int    *ChipMatch = NULL;
     10
     11/* what is the currently registered mosaic image? */
     12int GetRegisteredMosaic () {
     13  return (iDIS);
     14}
    915
    1016/* given an image array and a current entry of type WRP, find matching DIS & Register it */
     
    4248    /* found a valid match */
    4349    RegisterMosaic (&images[i].coords);
     50    iDIS = i;
     51    return (TRUE);
    4452  }
    4553
     
    5058    /* found a valid match */
    5159    RegisterMosaic (&images[i].coords);
     60    iDIS = i;
    5261    return (TRUE);
    5362  }
     
    7281
    7382  RegisterMosaic (&images[N].coords);
     83  iDIS = N;
    7484  return (TRUE);
    7585}
  • trunk/Ohana/src/libohana/Makefile

    r11880 r12840  
    1919TFLAGS        = $(FULL_CFLAGS) $(FULL_LDFLAGS) -ltap_ohana
    2020
    21 install: $(DESTLIB)/libohana.a $(DESTLIB)/libohana.so
    22 libohana: $(LIB)/libohana.$(ARCH).a $(LIB)/libohana.$(ARCH).so
     21install: $(DESTLIB)/libohana.a $(DESTLIB)/libohana.$(DLLTYPE)
     22libohana: $(LIB)/libohana.$(ARCH).a $(LIB)/libohana.$(ARCH).$(DLLTYPE)
    2323testcode: install $(TEST)
    2424test:
     
    5050
    5151$(LIB)/libohana.$(ARCH).a: $(OBJS)
    52 $(LIB)/libohana.$(ARCH).so: $(OBJS)
     52$(LIB)/libohana.$(ARCH).$(DLLTYPE): $(OBJS)
    5353
    5454$(DESTLIB)/libohana.a:  $(LIB)/libohana.$(ARCH).a
    55 $(DESTLIB)/libohana.so: $(LIB)/libohana.$(ARCH).so
     55$(DESTLIB)/libohana.$(DLLTYPE): $(LIB)/libohana.$(ARCH).$(DLLTYPE)
    5656
    5757$(TESTDIR)/%.$(ARCH) : $(TESTDIR)/%.c
  • trunk/Ohana/src/opihi/cmd.astro/Makefile

    r11891 r12840  
    5050$(SRC)/imfit-fgauss.$(ARCH).o      \
    5151$(SRC)/imfit-pgauss.$(ARCH).o      \
    52 $(SRC)/imfit-Pgauss.$(ARCH).o      \
     52$(SRC)/imfit-pgauss-psf.$(ARCH).o          \
    5353$(SRC)/imfit-qgauss.$(ARCH).o      \
    54 $(SRC)/imfit-Qgauss.$(ARCH).o      \
     54$(SRC)/imfit-qgauss-psf.$(ARCH).o          \
    5555$(SRC)/imfit-sgauss.$(ARCH).o      \
    56 $(SRC)/imfit-Sgauss.$(ARCH).o      \
     56$(SRC)/imfit-sgauss-psf.$(ARCH).o          \
    5757$(SRC)/imfit-qfgauss.$(ARCH).o     \
    5858$(SRC)/imfit-qrgauss.$(ARCH).o     
  • trunk/Ohana/src/opihi/cmd.astro/imfit-test.c

    r3144 r12840  
    3131      par[3] = tp1;
    3232    }
    33     if (fitfunc == SgaussTD) {
     33    if (fitfunc == sgauss_psfTD) {
    3434      tp1 = par[0];
    3535      tp2 = par[3];
     
    4848      par[4] = tp2;
    4949    }
    50     if (fitfunc == PgaussTD) {
     50    if (fitfunc == pgauss_psfTD) {
    5151      tp1 = par[0];
    5252      par[0] = par[0]*1.05;
  • trunk/Ohana/src/opihi/cmd.astro/imfit.c

    r9275 r12840  
    5757    fgauss_setup (argv[N]);
    5858    pgauss_setup (argv[N]);
    59     Pgauss_setup (argv[N]);
     59    pgauss_psf_setup (argv[N]);
    6060    sgauss_setup (argv[N]);
    61     Sgauss_setup (argv[N]);
     61    sgauss_psf_setup (argv[N]);
    6262    qgauss_setup (argv[N]);
    63     Qgauss_setup (argv[N]);
     63    qgauss_psf_setup (argv[N]);
    6464    qfgauss_setup (argv[N]);
    6565    qrgauss_setup (argv[N]);
  • trunk/Ohana/src/opihi/cmd.astro/imsub.c

    r7917 r12840  
    2222    fgauss_setup (argv[N]);
    2323    pgauss_setup (argv[N]);
    24     Pgauss_setup (argv[N]);
     24    pgauss_psf_setup (argv[N]);
    2525    sgauss_setup (argv[N]);
    26     Sgauss_setup (argv[N]);
     26    sgauss_psf_setup (argv[N]);
    2727    qgauss_setup (argv[N]);
    28     Qgauss_setup (argv[N]);
     28    qgauss_psf_setup (argv[N]);
    2929    qfgauss_setup (argv[N]);
    3030    qrgauss_setup (argv[N]);
  • trunk/Ohana/src/opihi/dvo/Makefile

    r11891 r12840  
    2323$(SRC)/ImageSelection.$(ARCH).o \
    2424$(SRC)/LoadImages.$(ARCH).o             \
    25 $(SRC)/cmpRead.$(ARCH).o                \
     25$(SRC)/cmpReadFile.$(ARCH).o            \
    2626$(SRC)/compare.$(ARCH).o               \
    2727$(SRC)/match_image.$(ARCH).o            \
  • trunk/Ohana/src/opihi/include/pantasks.h

    r12404 r12840  
    138138  Task   *task;
    139139
    140   IOBuffer    stdout;                   /* stdout storage buffer */
    141   IOBuffer    stderr;                   /* stderr storage buffer */
     140  /* this cries out for another structure... */
     141  IOBuffer    stdout_buff;    /* stdout storage buffer */
     142  char       *stdout_dump;    // output target file for stdout
     143  int         stdout_size;    /* size of pending stdout buffer (controller) */
     144  int         stdout_fd;      /* stdout pipe (local only) */
     145
     146  IOBuffer    stderr_buff;    /* stderr storage buffer */
     147  char       *stderr_dump;    // output target file for stderr
     148  int         stderr_size;    /* size of pending stderr buffer (controller) */
     149  int         stderr_fd;      /* stderr pipe (local only) */
     150
    142151  JobMode     mode;                     /* local or controller? */
    143 
    144   char   *stdout_dump;
    145   char   *stderr_dump;
    146152  char   *realhost;
    147 
    148   int         stdout_size;              /* size of pending stdout buffer (controller) */
    149   int         stderr_size;              /* size of pending stderr buffer (controller) */
    150   int         stdout_fd;                /* stdout pipe (local only) */
    151   int         stderr_fd;                /* stderr pipe (local only) */
    152153
    153154  double dtime;
  • trunk/Ohana/src/opihi/include/pcontrol.h

    r12332 r12840  
    7575  JobStat      state;
    7676  JobStat      stack;
    77   IOBuffer     stdout;
    78   IOBuffer     stderr;
     77  IOBuffer     stdout_buff;
     78  IOBuffer     stderr_buff;
    7979  Ptime        start;
    8080  Ptime        stop;
     
    8888typedef struct {
    8989  char       *hostname;
    90   int         stdin;
    91   int         stdout;
    92   int         stderr;
     90  int         stdin_fd;
     91  int         stdout_fd;
     92  int         stderr_fd;
    9393  int         markoff;
    9494  int         pid;
  • trunk/Ohana/src/opihi/pantasks/CheckJobs.c

    r12404 r12840  
    4848        /* push output buffer data to the stdout and stderr queues */
    4949        /* XXX this will break on 0 values in output streams */
    50         PushNamedQueue ("stdout", job[0].stdout.buffer);
    51         PushNamedQueue ("stderr", job[0].stderr.buffer);
     50        PushNamedQueue ("stdout", job[0].stdout_buff.buffer);
     51        PushNamedQueue ("stderr", job[0].stderr_buff.buffer);
    5252
    5353        /* save the stdout and stderr if desired */
     
    5757            gprint (GP_ERR, "unable to open stdout dump file %s\n", job[0].stdout_dump);
    5858          } else {
    59             fwrite (job[0].stdout.buffer, 1, job[0].stdout.Nbuffer, f);
     59            fwrite (job[0].stdout_buff.buffer, 1, job[0].stdout_buff.Nbuffer, f);
    6060            fclose (f);
    6161          }
     
    6666            gprint (GP_ERR, "unable to open stderr dump file %s\n", job[0].stderr_dump);
    6767          } else {
    68             fwrite (job[0].stderr.buffer, 1, job[0].stderr.Nbuffer, f);
     68            fwrite (job[0].stderr_buff.buffer, 1, job[0].stderr_buff.Nbuffer, f);
    6969            fclose (f);
    7070          }
  • trunk/Ohana/src/opihi/pantasks/ControllerOps.c

    r11898 r12840  
    2929  if ((job[0].state == JOB_EXIT) || (job[0].state == JOB_CRASH)) {
    3030    gettimeofday (&start, (void *) NULL);
    31     GetJobOutput ("stdout", job[0].pid, &job[0].stdout, job[0].stdout_size);
     31    GetJobOutput ("stdout", job[0].pid, &job[0].stdout_buff, job[0].stdout_size);
    3232    gettimeofday (&stop, (void *) NULL);
    3333    dtime = DTIME (stop, start);
     
    3535
    3636    gettimeofday (&start, (void *) NULL);
    37     GetJobOutput ("stderr", job[0].pid, &job[0].stderr, job[0].stderr_size);
     37    GetJobOutput ("stderr", job[0].pid, &job[0].stderr_buff, job[0].stderr_size);
    3838    gettimeofday (&stop, (void *) NULL);
    3939    dtime = DTIME (stop, start);
  • trunk/Ohana/src/opihi/pantasks/JobOps.c

    r12466 r12840  
    143143     need to have matched entries to these quantites in the job structure */
    144144
    145   InitIOBuffer (&job[0].stdout, 0x100);
    146   InitIOBuffer (&job[0].stderr, 0x100);
     145  InitIOBuffer (&job[0].stdout_buff, 0x100);
     146  InitIOBuffer (&job[0].stderr_buff, 0x100);
    147147
    148148  job[0].stdout_dump = NULL;
     
    181181  if (job[0].stderr_dump != NULL) free (job[0].stderr_dump);
    182182
    183   FreeIOBuffer (&job[0].stdout);
    184   FreeIOBuffer (&job[0].stderr);
     183  FreeIOBuffer (&job[0].stdout_buff);
     184  FreeIOBuffer (&job[0].stderr_buff);
    185185  free (job);
    186186  return;
  • trunk/Ohana/src/opihi/pantasks/LocalJob.c

    r11898 r12840  
    1515
    1616  if ((job[0].state == JOB_EXIT) || (job[0].state == JOB_CRASH)) {
    17     EmptyIOBuffer (&job[0].stdout, 10, job[0].stdout_fd);
    18     EmptyIOBuffer (&job[0].stderr, 10, job[0].stderr_fd);
     17    EmptyIOBuffer (&job[0].stdout_buff, 10, job[0].stdout_fd);
     18    EmptyIOBuffer (&job[0].stderr_buff, 10, job[0].stderr_fd);
    1919    close (job[0].stdout_fd);
    2020    close (job[0].stderr_fd);
    2121  } else {
    2222    /* read stdout buffer */
    23     Nread = ReadtoIOBuffer (&job[0].stdout, job[0].stdout_fd);
     23    Nread = ReadtoIOBuffer (&job[0].stdout_buff, job[0].stdout_fd);
    2424    switch (Nread) {
    2525      case -2:  /* error in read (programming error?  system level error?) */
     
    3434 
    3535    /* read stderr buffer */
    36     Nread = ReadtoIOBuffer (&job[0].stderr, job[0].stderr_fd);
     36    Nread = ReadtoIOBuffer (&job[0].stderr_buff, job[0].stderr_fd);
    3737    switch (Nread) {
    3838      case -2:  /* error in read (programming error?  system level error?) */
  • trunk/Ohana/src/opihi/pclient/ChildOps.c

    r10639 r12840  
    33#include <sys/types.h>
    44#include <unistd.h>
    5 #include <stropts.h>
     5// #include <stropts.h>
    66
    77static int Nbad = 0;
  • trunk/Ohana/src/opihi/pcontrol/CheckDoneJob.c

    r10652 r12840  
    1212
    1313  success = TRUE;
    14   success &= GetJobOutput ("stdout", host, &job[0].stdout, job[0].stdout_size);
    15   success &= GetJobOutput ("stderr", host, &job[0].stderr, job[0].stderr_size);
     14  success &= GetJobOutput ("stdout", host, &job[0].stdout_buff, job[0].stdout_size);
     15  success &= GetJobOutput ("stderr", host, &job[0].stderr_buff, job[0].stderr_size);
    1616
    1717  if (!success) {
  • trunk/Ohana/src/opihi/pcontrol/GetJobOutput.c

    r10652 r12840  
    1414
    1515  /* flush any earlier messages */
    16   ReadtoIOBuffer (buffer, host[0].stdout);
     16  ReadtoIOBuffer (buffer, host[0].stdout_fd);
    1717  FlushIOBuffer (buffer);
    1818  Nstart = buffer[0].Nbuffer;
     
    2323
    2424  /* send cmd (stdout / stderr) */
    25   status = write_fmt (host[0].stdin, "%s\n", cmd);
     25  status = write_fmt (host[0].stdin_fd, "%s\n", cmd);
    2626
    2727  /* is pipe still open? */
     
    3232  status = -1;
    3333  for (i = 0; (i < PCLIENT_TIMEOUT) && (status != 0) && (line == NULL); i++) {
    34     status = ReadtoIOBuffer (buffer, host[0].stdout);
     34    status = ReadtoIOBuffer (buffer, host[0].stdout_fd);
    3535    if ((buffer[0].Nbuffer - Nstart) >= Nbytes) {
    3636      line = memstr (buffer[0].buffer, PCLIENT_PROMPT, buffer[0].Nbuffer);
  • trunk/Ohana/src/opihi/pcontrol/HostOps.c

    r10652 r12840  
    151151  ALLOCATE (host, Host, 1);
    152152
    153   host[0].hostname = strcreate (hostname);
    154   host[0].stdin    = 0;
    155   host[0].stdout  = 0;
    156   host[0].stderr  = 0;
    157   host[0].HostID   = NextHostID();
     153  host[0].hostname  = strcreate (hostname);
     154  host[0].stdin_fd  = 0;
     155  host[0].stdout_fd = 0;
     156  host[0].stderr_fd = 0;
     157  host[0].HostID    = NextHostID();
    158158
    159159  host[0].lasttry.tv_sec = 0;
  • trunk/Ohana/src/opihi/pcontrol/JobOps.c

    r11388 r12840  
    148148
    149149  /* do this step on start? */
    150   InitIOBuffer (&job[0].stdout, 0x1000);
    151   InitIOBuffer (&job[0].stderr, 0x1000);
     150  InitIOBuffer (&job[0].stdout_buff, 0x1000);
     151  InitIOBuffer (&job[0].stderr_buff, 0x1000);
    152152
    153153  JobID = job[0].JobID;
     
    167167  FREE (job[0].argv);
    168168
    169   FreeIOBuffer (&job[0].stdout);
    170   FreeIOBuffer (&job[0].stderr);
     169  FreeIOBuffer (&job[0].stdout_buff);
     170  FreeIOBuffer (&job[0].stderr_buff);
    171171
    172172  FREE (job);
  • trunk/Ohana/src/opihi/pcontrol/PclientCommand.c

    r10668 r12840  
    1919
    2020  // flush the stdout and stderr buffers here
    21   ReadtoIOBuffer (buffer, host[0].stdout);
     21  ReadtoIOBuffer (buffer, host[0].stdout_fd);
    2222  FlushIOBuffer (buffer);
    23   ReadtoIOBuffer (buffer, host[0].stderr);
     23  ReadtoIOBuffer (buffer, host[0].stderr_fd);
    2424  FlushIOBuffer (buffer);
    2525
    2626  /* send command to client (adding on \n) */
    27   status = write_fmt (host[0].stdin, "%s\n", command);
     27  status = write_fmt (host[0].stdin_fd, "%s\n", command);
    2828
    2929  /* is pipe still open? */
     
    3737  status = -1;
    3838  for (i = 0; (i < PCLIENT_TIMEOUT) && (status != 0) && (line == NULL); i++) {
    39     status = ReadtoIOBuffer (buffer, host[0].stdout);
     39    status = ReadtoIOBuffer (buffer, host[0].stdout_fd);
    4040    line = memstr (buffer[0].buffer, response, buffer[0].Nbuffer);
    4141    if (status == -1) nanosleep (&request, &remain);
  • trunk/Ohana/src/opihi/pcontrol/StartHost.c

    r8546 r12840  
    3939  host[0].lasttry.tv_usec = 0;
    4040
    41   host[0].stdin  = stdio[0];
    42   host[0].stdout = stdio[1];
    43   host[0].stderr = stdio[2];
    44   host[0].pid    = pid;
     41  host[0].stdin_fd  = stdio[0];
     42  host[0].stdout_fd = stdio[1];
     43  host[0].stderr_fd = stdio[2];
     44  host[0].pid       = pid;
    4545  PutHost (host, PCONTROL_HOST_IDLE, STACK_BOTTOM);
    4646  return (TRUE);
  • trunk/Ohana/src/opihi/pcontrol/StopHosts.c

    r10666 r12840  
    22
    33void DownHost (Host *host) {
    4   CLOSE (host[0].stdin);
    5   CLOSE (host[0].stdout);
    6   CLOSE (host[0].stderr);
     4  CLOSE (host[0].stdin_fd);
     5  CLOSE (host[0].stdout_fd);
     6  CLOSE (host[0].stderr_fd);
    77  host[0].job = NULL;
    88  PutHost (host, PCONTROL_HOST_DOWN, STACK_BOTTOM);
     
    1010
    1111void OffHost (Host *host) {
    12   CLOSE (host[0].stdin);
    13   CLOSE (host[0].stdout);
    14   CLOSE (host[0].stderr);
     12  CLOSE (host[0].stdin_fd);
     13  CLOSE (host[0].stdout_fd);
     14  CLOSE (host[0].stderr_fd);
    1515  host[0].job = NULL;
    1616  PutHost (host, PCONTROL_HOST_OFF, STACK_BOTTOM);
  • trunk/Ohana/src/opihi/pcontrol/stdout.c

    r8296 r12840  
    2929
    3030found_stdout:
    31   buffer = &job[0].stdout;
     31  buffer = &job[0].stdout_buff;
    3232  fwrite (buffer[0].buffer, 1, buffer[0].Nbuffer, stdout);
    3333  gprint (GP_LOG, "STATUS %d\n", 0);
     
    6464
    6565found_stderr:
    66   buffer = &job[0].stderr;
     66  buffer = &job[0].stderr_buff;
    6767  fwrite (buffer[0].buffer, 1, buffer[0].Nbuffer, stdout);
    6868  gprint (GP_LOG, "STATUS %d\n", 0);
Note: See TracChangeset for help on using the changeset viewer.