Changeset 1154 for trunk/xcache/xc_lock.c
- Timestamp:
- 2012-10-18T09:49:35+02:00 (7 months ago)
- File:
-
- 1 edited
-
trunk/xcache/xc_lock.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xcache/xc_lock.c
r1027 r1154 88 88 89 89 if (pathname == NULL) { 90 static int i = 0;90 static int instanceId = 0; 91 91 const char default_tmpdir[] = { DEFAULT_SLASH, 't', 'm', 'p', '\0' }; 92 92 const char *tmpdir; … … 101 101 size = strlen(tmpdir) + sizeof("/.xcache.lock") - 1 + 3 * 10 + 100; 102 102 myname = malloc(size); 103 snprintf(myname, size - 1, "%s%c.xcache.%d.%d.%d.lock", tmpdir, DEFAULT_SLASH, (int) getuid(), i ++, rand());103 snprintf(myname, size - 1, "%s%c.xcache.%d.%d.%d.lock", tmpdir, DEFAULT_SLASH, (int) getuid(), (int) getpid(), ++instanceId); 104 104 pathname = myname; 105 105 }
Note: See TracChangeset
for help on using the changeset viewer.

