Changeset 5442

Show
Ignore:
Timestamp:
09/27/07 04:57:03 (14 months ago)
Author:
erijo
Message:

Save licq.debug_rw_mutex in basedir instead of in /tmp.

Location:
trunk/licq
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/licq/include/pthread_rdwr.h

    r5431 r5442  
    3232 * debug deadlocks. If a (potential) deadlock is discovered, the 
    3333 * daemon will print a message to stderr (and to the file 
    34  * /tmp/licq.debug_rw_mutex) and than hang forever (if it's a real 
    35  * deadlock). 
     34 * <basedir>/licq.debug_rw_mutex) and than hang forever (if it's a 
     35 * real deadlock). 
    3636 *  
    3737 * This is when you should attach gdb to the process (gdb --pid `pidof 
  • trunk/licq/src/pthread_rdwr.c

    r5440 r5442  
    2929#include <sys/time.h> 
    3030#include <time.h> 
     31 
     32extern char BASE_DIR[]; 
    3133#endif 
    3234 
     
    9799    print_users(stderr, rdwrp, reading); 
    98100 
    99     // Also save it in /tmp/licq.debug_rw_mutex 
    100     FILE* file = fopen("/tmp/licq.debug_rw_mutex", "w"); 
     101    // Also save it in <basedir>/licq.debug_rw_mutex 
     102    char filename[255]; 
     103    snprintf(filename, 255, "%s/licq.debug_rw_mutex", BASE_DIR); 
     104    FILE* file = fopen(filename, "w"); 
    101105    if (file != NULL) 
    102106    {