Changeset 917 for trunk/Update Checker Sources/main.m
- Timestamp:
- 07/29/08 16:35:01 (4 months ago)
- Files:
-
- trunk/Update Checker Sources/main.m (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Update Checker Sources/main.m
r913 r917 13 13 #define lockPath "/tmp/PerianUpdateLock" 14 14 15 static int fp = -1; 16 17 static void deleteLock() 18 { 19 close(fp); 20 unlink(lockPath); 21 } 22 15 23 int main(int argc, char *argv[]) 16 24 { 17 intfp = open(lockPath, O_CREAT | O_EXCL);25 fp = open(lockPath, O_CREAT | O_EXCL); 18 26 if(fp == -1) 19 27 { … … 31 39 if(fp == -1) 32 40 return 0; 41 42 atexit(deleteLock); 33 43 34 44 int ret = NSApplicationMain(argc, (const char **) argv); 35 45 36 close(fp);37 unlink(lockPath);38 39 46 return ret; 40 47 }
