02-12-2009
current locks on a file
I want to know all the locks on a file - read, write etc acquired by various processes. Is there any way to know ?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
At times we see the "file in use" when we run RCS (revision conrol system" on this file. Most of time, we do not see this message.
How do we identify the locks on this file and how do we release those locks? I can imagine it happens when there are some processes running on this file.
THe... (1 Reply)
Discussion started by: vadimsf
1 Replies
2. Programming
I have an application that is multithreaded and concurrent. Multiple instances of the application must run at the same time.
Each thread in each process accesses shared resources. For this purpose I've employed Butenhof's read-write locks. Inter-process locking is based on fcntl. For example,... (3 Replies)
Discussion started by: adamb
3 Replies
3. Solaris
Hi,
One of my prod jobs using Ab Initio (which is Solaris Based) returned this error:
========= Error from Reformat_3.000 on f7j21-01.xxxx3.com ========= Failed opening file for flow: Resource temporarily unavailable
Flow = "Flow_11.000" connected to output port "out0" of "Reformat_3.000"... (0 Replies)
Discussion started by: teenu18
0 Replies
4. UNIX for Advanced & Expert Users
Hi,
We have an interesting problem with F-Secure SSH (v 3.1.0) running on HP-UX. It seems that when scp or sftp commands are issued they are successful but it counts as a 'strike' against the target user locking the account out after 3 attempts.
When the user is re-enabled in SAM - it reports... (4 Replies)
Discussion started by: b0bbins
4 Replies
5. HP-UX
Hi,
How to list the files which are not locked?
I want to read the files that are not locked by other user only.
can we do it using ls option? (5 Replies)
Discussion started by: vijaykrc
5 Replies
6. Linux
Hi there!
Can someone please tell me what is for the directory /etc/locks and provide me with an example. I certainly don't understand it very well.
Any help will be much appreciated! (1 Reply)
Discussion started by: agasamapetilon
1 Replies
7. AIX
We are finding sometimes after a user process has been killed, when the user tries to reconnect, he gets the message that there has been too many attempts and his password is locked.
Has anyone see this?
AIX 5.3 tl9 sp3
thanks (0 Replies)
Discussion started by: MizzGail
0 Replies
8. Programming
I need help!Many Thanks!
Now,I try to manage the shared memory inter-process .
Inevitably,I have to deal with the synchronous.
I know the pthread_rwlock in posix,and I compile ,then run successfully in Red Hat Enterprise 4.
I have a doubt about whether the Posix supports the system such as... (1 Reply)
Discussion started by: weizh
1 Replies
9. Shell Programming and Scripting
Hi,
I have the following requirement:
I have load_cdr as main scriptwhich loads all the file records into vertica database through unix script. But there are two files which try to update same table..n thats y my script is getting failed...
Can any1 give me some logic how to over come this... (6 Replies)
Discussion started by: gnnsprapa
6 Replies
10. Solaris
hello;
I have inherited a SunOS sjcorpftp 5.10 Generic_118855-36 i86pc i386 i86pc
whenever someone needs a new password, I change it via
"passwd username"
then
"passwd -f username" so they can change their password
on my only sun sparc 5.9 you can "accessed denied" when you... (0 Replies)
Discussion started by: ikeleong
0 Replies
LEARN ABOUT MOJAVE
pthread_rwlock_rdlock
PTHREAD_RWLOCK_RDLOCK(3) BSD Library Functions Manual PTHREAD_RWLOCK_RDLOCK(3)
NAME
pthread_rwlock_rdlock, pthread_rwlock_tryrdlock -- acquire a read/write lock for reading
SYNOPSIS
#include <pthread.h>
int
pthread_rwlock_rdlock(pthread_rwlock_t *lock);
int
pthread_rwlock_tryrdlock(pthread_rwlock_t *lock);
DESCRIPTION
The pthread_rwlock_rdlock() function acquires a read lock on lock provided that lock is not presently held for writing and no writer threads
are presently blocked on the lock. If the read lock cannot be immediately acquired, the calling thread blocks until it can acquire the lock.
The pthread_rwlock_tryrdlock() function performs the same action, but does not block if the lock cannot be immediately obtained (i.e., the
lock is held for writing or there are waiting writers).
A thread may hold multiple concurrent read locks. If so, pthread_rwlock_unlock() must be called once for each lock obtained.
The results of acquiring a read lock while the calling thread holds a write lock are undefined.
IMPLEMENTATION NOTES
To prevent writer starvation, writers are favored over readers.
RETURN VALUES
If successful, the pthread_rwlock_rdlock() and pthread_rwlock_tryrdlock() functions will return zero. Otherwise an error number will be
returned to indicate the error.
ERRORS
The pthread_rwlock_tryrdlock() function will fail if:
[EBUSY] The lock could not be acquired because a writer holds the lock or was blocked on it.
The pthread_rwlock_rdlock() and pthread_rwlock_tryrdlock() functions may fail if:
[EAGAIN] The lock could not be acquired because the maximum number of read locks against lock has been exceeded.
[EDEADLK] The current thread already owns lock for writing.
[EINVAL] The value specified by lock is invalid.
[ENOMEM] Insufficient memory exists to initialize the lock (applies to statically initialized locks only).
SEE ALSO
pthread_rwlock_init(3), pthread_rwlock_trywrlock(3), pthread_rwlock_unlock(3), pthread_rwlock_wrlock(3)
STANDARDS
The pthread_rwlock_rdlock() and pthread_rwlock_tryrdlock() functions are expected to conform to Version 2 of the Single UNIX Specification
(``SUSv2'').
HISTORY
The pthread_rwlock_rdlock() function first appeared in FreeBSD 3.0.
BSD
August 4, 1998 BSD