* fhandler.cc (fhandler_base::lock): Move to flock.cc.

(fhandler_base::fixup_after_exec): Reset mandatory_locking.
	* fhandler.h (class fhandler_base): Add mandatory_locking status flag.
	Add mandatory_locking accessor methods.  Accommodate change throughout.
	(fhandler_base::mand_lock): Declare.
	(class fhandler_disk_file): Drop in favor of new status flag.
	* (fhandler_disk_file::fcntl): Call need_fork_fixup if mandatory_locking
	flag gets set.
	* flock.cc (fhandler_base::lock): Define here.
	(flock): Handle mandatory_locking.
	(lockf): Ditto.
	(fhandler_base::mand_lock): Define.
This commit is contained in:
Corinna Vinschen
2013-06-04 10:24:43 +00:00
parent ca1dd3a9b5
commit edd73646f3
6 changed files with 51 additions and 22 deletions

View File

@ -1230,13 +1230,6 @@ fhandler_base::ioctl (unsigned int cmd, void *buf)
return res;
}
int
fhandler_base::lock (int, struct flock *)
{
set_errno (EINVAL);
return -1;
}
int __reg2
fhandler_base::fstat (struct stat *buf)
{
@ -1553,6 +1546,7 @@ fhandler_base::fixup_after_exec ()
debug_printf ("here for '%s'", get_name ());
if (unique_id && close_on_exec ())
del_my_locks (after_exec);
mandatory_locking (false);
}
void
fhandler_base_overlapped::fixup_after_exec ()