Changeset af16ad3


Ignore:
Timestamp:
Jul 27, 2010, 9:10:44 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
release-1.6
Children:
88f0dae
Parents:
6687135
git-author:
Nelson Elhage <nelhage@mit.edu> (07/15/10 23:40:59)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/27/10 21:10:44)
Message:
Use a uniquified debug file location.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r6687135 raf16ad3  
    10091009  if (g->debug_file == NULL ||
    10101010      (open_file && strcmp(filename, open_file) != 0)) {
     1011    char *path;
    10111012    int fd;
    10121013
     
    10161017    g->debug_file = NULL;
    10171018
    1018     fd = open(filename, O_CREAT|O_WRONLY|O_EXCL, 0600);
     1019    path = owl_sprintf("%s.%d", filename, getpid());
     1020    fd = open(path, O_CREAT|O_WRONLY|O_EXCL, 0600);
     1021    owl_free(path);
     1022
    10191023    if (fd >= 0)
    10201024      g->debug_file = fdopen(fd, "a");
  • owl.h

    r26a1398 raf16ad3  
    7474
    7575#define OWL_DEBUG 0
    76 #define OWL_DEBUG_FILE "/var/tmp/owldebug"
     76#define OWL_DEBUG_FILE "/var/tmp/barnowl-debug"
    7777
    7878#define OWL_CONFIG_DIR "/.owl"             /* this is relative to the user's home directory */
  • variable.c

    r937ac795 raf16ad3  
    186186  OWLVAR_PATH( "debug_file" /* %OwlVarStub */, OWL_DEBUG_FILE,
    187187               "path for logging debug messages when debugging is enabled",
    188                "This file will be logged to if 'debug' is set to 'on'.\n"),
     188               "This file will be logged to if 'debug' is set to 'on'.\n"
     189               "BarnOwl will append a dot and the current process's pid to the filename."),
    189190 
    190191  OWLVAR_PATH( "zsigproc" /* %OwlVarStub:zsigproc */, NULL,
Note: See TracChangeset for help on using the changeset viewer.