Difference between revisions of "LOCKINFO()"
From Lianjapedia
Yvonne.milne (Talk | contribs) |
|||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
Function to return lock information about a specified file | Function to return lock information about a specified file | ||
− | |||
==Syntax== | ==Syntax== | ||
LOCKINFO(<expC>) | LOCKINFO(<expC>) | ||
− | |||
==See Also== | ==See Also== | ||
[[ISLOCKED()]], [[LKSYS()]], [[SET EXCLUSIVE]] | [[ISLOCKED()]], [[LKSYS()]], [[SET EXCLUSIVE]] | ||
− | |||
==Description== | ==Description== | ||
Line 23: | Line 20: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | ? lockinfo("/opt/ | + | ? lockinfo("/opt/lianja/data/southwind/example.dbf") |
root(8053) /dev/pts/3 shared | root(8053) /dev/pts/3 shared | ||
− | ? lockinfo("/opt/ | + | ? lockinfo("/opt/lianja/data/southwind/example.dbx") |
root(8053) /dev/pts/3 shared | root(8053) /dev/pts/3 shared | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
− | [[Category: | + | [[Category:Cursor Functions]] |
− | [[Category: | + | [[Category:Lianja VFP Extensions]] |
+ | [[Category:VFP Function Extensions]] |
Latest revision as of 10:54, 4 February 2013
Contents
Purpose
Function to return lock information about a specified file
Syntax
LOCKINFO(<expC>)
See Also
ISLOCKED(), LKSYS(), SET EXCLUSIVE
Description
The LOCKINFO() function returns lock information about the specified file named in <expC>, which can be a table or index file. If there are no locks active on the specified file or it does not exist, LOCKINFO() returns an empty string. If there are locks active on the file, LOCKINFO() returns a string with the following information about the lock(s):
- name of user
- id of process
- tty connection
- mode: shared / exclusive
Information is returned about one process, although more than one process may have locks on the file.
Example
? lockinfo("/opt/lianja/data/southwind/example.dbf") root(8053) /dev/pts/3 shared ? lockinfo("/opt/lianja/data/southwind/example.dbx") root(8053) /dev/pts/3 shared