* 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:
Corinna Vinschen
2009-07-22 15:46:36 +00:00
parent 1e497ebd33
commit 4a77aea071
4 changed files with 35 additions and 7 deletions

View File

@@ -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)));