Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: os.showtableuse - Function Up: os - Tool Previous: os.remove - Function


os.lockinfo - Function



Package utility
Module misc
Tool os


get info about table use and locking


Synopsis
lockinfo(tablename)


Description
Get info about use and locking of a table. If so, give the pid of the process using or locking it. The function showtableuse uses this function to print a message about the use and locking of a table.

It returns a vector of 3 integer elements. The first element tells if the table is used or locked.
0 = not used
1 = used, but not locked
2 = read-locked
3 = write-locked
The second element gives the pid of the process using or locking the table.
The third element is 1 if the lock is permanent (otherwise 0).

Note that multiple processes can use a table or hold a read-lock. This function gives the pid of only one of those processes.



Example
Note that this example is done better by function showtableuse.
  res := dos.lockinfo ('~/aips++/test/hol.ms');
  if (res[1] != 0) {
    print (paste ('The table is used (and maybe locked) by process', res[2]));
  }



Arguments

tablename in table name
    Allowed: string


Returns
vector of 2 integers or fail




next up previous contents index
Next: os.showtableuse - Function Up: os - Tool Previous: os.remove - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15