~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201207201942

« back to all changes in this revision

Viewing changes to lib/file/fileLockPrimitive.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-10-23 15:32:00 UTC
  • mfrom: (1.1.2 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081023153200-gc1bfx89hj35c799
Tags: 2008.10.10-123053-2
* Correcting typo in dh_installinit call.
* Downgrading depends on module-assistant to recommends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
#include <stdlib.h>
30
30
#include <string.h>
31
31
#include <errno.h>
 
32
#include <sys/types.h>
32
33
#include <sys/stat.h>
33
 
#include <sys/types.h>
34
34
#include <fcntl.h>
35
35
#if defined(_WIN32)
36
36
#include <windows.h>
373
373
    *
374
374
    * Here is picture of valid forms:
375
375
    *
376
 
    * 0 1 2 3 4 5 6    Comment
 
376
    * 0 1 2 3 4 5 6   Comment
377
377
    *-------------------------
378
378
    * A B C D         contents, no payload, no list entries
379
379
    * A B C D [       contents, no payload, no list entries
380
380
    * A B C D P       contents, a payload,  no list entries
381
381
    * A B C D [ x     contents, no payload, one list entry
382
382
    * A B C D P x     contents, a payload,  one list entry
383
 
    * A B C D [ x y   contents, no payload, two list entries,
 
383
    * A B C D [ x y   contents, no payload, two list entries
384
384
    * A B C D P x y   contents, a payload,  two list entries
385
385
    */
386
386
 
1178
1178
#if !defined(_WIN32)
1179
1179
   mode_t save;
1180
1180
 
 
1181
   ASSERT(pathName);
 
1182
 
1181
1183
   save = umask(0);
 
1184
#else
 
1185
   ASSERT(pathName);
1182
1186
#endif
1183
1187
 
1184
 
   ASSERT(pathName);
1185
 
 
1186
1188
   err = FileCreateDirectoryRobust(pathName);
1187
1189
 
1188
1190
#if !defined(_WIN32)
1336
1338
 
1337
1339
         FileRemoveDirectoryRobust(*entryDirectory);
1338
1340
      } else {
1339
 
          if (err != EEXIST) {
 
1341
          if ((err != EEXIST) &&  // Another process/thread created it...
 
1342
              (err != ENOENT)) {  // lockDir is gone...
1340
1343
             Warning(LGPFX" %s creation failure on '%s': %s\n",
1341
1344
                     __FUNCTION__, UTF8(*entryDirectory), strerror(err));
1342
1345