* fhandler.h (enum del_lock_called_from): New enumeration.
(fhandler_base::del_my_locks): Declare taking a del_lock_called_from as argument. * fhandler.cc (fhandler_base::close): Call del_my_locks with "on_close". (fhandler_base::fixup_after_fork): Call del_my_locks with "after_fork". (fhandler_base::fixup_after_exec): Call del_my_locks with "after_exec". * flock.cc (fhandler_base::del_my_locks): Take del_lock_called_from as argument. Call node->del_my_locks with NULL handle in after_exec case. Explain why.
This commit is contained in:
@@ -93,6 +93,12 @@ enum query_state {
|
||||
query_write_attributes = 4
|
||||
};
|
||||
|
||||
enum del_lock_called_from {
|
||||
on_close,
|
||||
after_fork,
|
||||
after_exec
|
||||
};
|
||||
|
||||
class fhandler_base
|
||||
{
|
||||
friend class dtable;
|
||||
@@ -141,7 +147,7 @@ class fhandler_base
|
||||
|
||||
/* Used for advisory file locking. See flock.cc. */
|
||||
long long unique_id;
|
||||
void del_my_locks (bool);
|
||||
void del_my_locks (del_lock_called_from);
|
||||
|
||||
HANDLE read_state;
|
||||
int wait_overlapped (bool, bool, DWORD *, DWORD = 0) __attribute__ ((regparm (3)));
|
||||
|
Reference in New Issue
Block a user