Changeset 26ad412 for global.c


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.
File:
1 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");
Note: See TracChangeset for help on using the changeset viewer.