Changeset 45cf49f


Ignore:
Timestamp:
Feb 23, 2009, 5:42:47 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
5283b01
Parents:
1375a6a
Message:
Don't send stderr to admin messages.

We've been getting a lot of complaints about 'uninitialized use of
...' errors and of spew from buggy zsig randomizers. In both cases,
this was an effect of the way we were sending stderr to error
messages, and those error messages went to admin messages because of a
change in 1.0.5.

We still send stderr to the error message log, but text there will no
longer show up anywhere by default.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r10d67d5 r45cf49f  
    33523352{
    33533353  va_list ap;
    3354   char *buff, *buff2;
     3354  char *buff;
    33553355  char *nl;
    3356   char *date;
    3357   time_t now;
    3358 
    3359   now=time(NULL);
    3360   date=owl_strdup(ctime(&now));
    3361   date[strlen(date)-1]='\0';
    33623356
    33633357  va_start(ap, fmt);
    33643358
    33653359  buff = g_strdup_vprintf(fmt, ap);
    3366   buff2 = owl_sprintf("%s %s", date, buff);
    33673360  owl_function_debugmsg("ERROR: %s", buff);
    33683361  nl = strchr(buff, '\n');
     
    33733366    owl_function_makemsg("[Error] %s", buff);
    33743367  }
    3375   owl_errqueue_append_err(owl_global_get_errqueue(&g), buff2);
     3368  owl_function_log_err(buff);
    33763369  va_end(ap);
     3370  owl_free(buff);
     3371}
     3372
     3373void owl_function_log_err(char *string)
     3374{
     3375  char *date;
     3376  time_t now;
     3377  char *buff;
     3378
     3379  now=time(NULL);
     3380  date=owl_strdup(ctime(&now));
     3381  date[strlen(date)-1]='\0';
     3382
     3383  buff = owl_sprintf("%s %s", date, string);
     3384
     3385  owl_errqueue_append_err(owl_global_get_errqueue(&g), buff);
     3386
     3387  owl_free(buff);
    33773388  owl_free(date);
    3378   owl_free(buff);
    3379   owl_free(buff2);
    33803389}
    33813390
  • owl.c

    r52a0f14 r45cf49f  
    717717  char buf[4096];
    718718  int rfd = d->fd;
     719  char *err;
     720
    719721  if (rfd<0) return;
    720722  if (-1 == ioctl(rfd, FIONREAD, (void*)&navail)) {
     
    730732    buf[navail] = '\0';
    731733  }
    732   owl_function_error("[stderr]\n%s", buf);
     734
     735  err = owl_sprintf("[stderr]\n%s", buf);
     736
     737  owl_function_log_err(err);
    733738}
    734739
Note: See TracChangeset for help on using the changeset viewer.