Changeset 26ad412


Ignore:
Timestamp:
Jul 16, 2010, 7:43:42 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
63d9de9
Parents:
50522b5
git-author:
Nelson Elhage <nelhage@mit.edu> (07/15/10 23:40:59)
git-committer:
Nelson Elhage <nelhage@mit.edu> (07/16/10 19:43:42)
Message:
Use a uniquified debug file location.
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • global.c

    r50522b5 r26ad412  
    10811081  if (g->debug_file == NULL ||
    10821082      (open_file && strcmp(filename, open_file) != 0)) {
     1083    char *path;
    10831084    int fd;
    10841085
     
    10881089    g->debug_file = NULL;
    10891090
    1090     fd = open(filename, O_CREAT|O_WRONLY|O_EXCL, 0600);
     1091    path = owl_sprintf("%s.%d", filename, getpid());
     1092    fd = open(path, O_CREAT|O_WRONLY|O_EXCL, 0600);
     1093    owl_free(path);
     1094
    10911095    if (fd >= 0)
    10921096      g->debug_file = fdopen(fd, "a");
  • owl.h

    rd12a8c7 r26ad412  
    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

    r3687413 r26ad412  
    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.