~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Python/import.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
298
298
}
299
299
 
300
300
/* This function is called from PyOS_AfterFork to ensure that newly
301
 
   created child processes do not share locks with the parent. */
 
301
   created child processes do not share locks with the parent.
 
302
   We now acquire the import lock around fork() calls but on some platforms
 
303
   (Solaris 9 and earlier? see isue7242) that still left us with problems. */
302
304
 
303
305
void
304
306
_PyImport_ReInitLock(void)
305
307
{
306
 
#ifdef _AIX
307
 
        if (import_lock != NULL)
308
 
                import_lock = PyThread_allocate_lock();
309
 
#endif
 
308
        if (import_lock != NULL)
 
309
                import_lock = PyThread_allocate_lock();
 
310
        import_lock_thread = -1;
 
311
        import_lock_level = 0;
310
312
}
311
313
 
312
314
#endif