Changeset af16ad3 for global.c


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