|
|
1.1 root 1: #include <sys/types.h>
2: #include <sys/stat.h>
3:
4: #define MON "gmon.out"
5: #define DIR "/usr/tmp/nntpd.prof"
6:
7: profile()
8: {
9: static char tmp[] = "gmon.XXXXXX";
10: struct stat statbuf;
11:
12: if (chdir(DIR) < 0)
13: return;
14:
15: if (stat(MON, statbuf) < 0)
16: return;
17:
18: (void) mktemp(tmp);
19:
20: (void) rename(MON, tmp);
21: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.