Sponsored Content
Full Discussion: File Locks
Operating Systems HP-UX File Locks Post 302193868 by ismail.dhaoui on Sunday 11th of May 2008 04:41:35 PM
Old 05-11-2008
Quote:
Originally Posted by jim mcnamara
lsof does not exist for HPUX unless you install it from the HPUX Porting Centre. Yes, they do not behave the same.
Ok, I aggree.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

"File in use" - how to identify locks on this file and release them?

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

Read/write locks within and between processes. Can you help?

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

Checking/ Releasing File Locks in 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

SCP / SFTP successful but locks out target account

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. Linux

Whats for: /etc/locks directory?

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

6. UNIX for Advanced & Expert Users

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 ? (2 Replies)
Discussion started by: radiatejava
2 Replies

7. AIX

password locks after user killed

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

help with write-read locks inter-process

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

How to avoid locks while loading database through UNIX script.?

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

Passwd -f locks out login

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
flock(3UCB)					     SunOS/BSD Compatibility Library Functions					       flock(3UCB)

NAME
flock - apply or remove an advisory lock on an open file SYNOPSIS
/usr/ucb/cc[ flag ... ] file ... #include <sys/file.h> int flock( fd, operation); int fd, operation; DESCRIPTION
flock() applies or removes an advisory lock on the file associated with the file descriptor fd. The compatibility version of flock() has been implemented on top of fcntl(2) locking. It does not provide complete binary compatibility. Advisory locks allow cooperating processes to perform consistent operations on files, but do not guarantee exclusive access (that is, pro- cesses may still access files without using advisory locks, possibly resulting in inconsistencies). The locking mechanism allows two types of locks: shared locks and exclusive locks. More than one process may hold a shared lock for a file at any given time, but multiple exclusive, or both shared and exclusive, locks may not exist simultaneously on a file. A lock is applied by specifying an operation parameter LOCK_SH for a shared lock or LOCK_EX for an exclusive lock. The operation paramerer may be ORed with LOCK_NB to make the operation non-blocking. To unlock an existing lock, the operation should be LOCK_UN. Read permission is required on a file to obtain a shared lock, and write permission is required to obtain an exclusive lock. Locking a seg- ment that is already locked by the calling process causes the old lock type to be removed and the new lock type to take effect. Requesting a lock on an object that is already locked normally causes the caller to block until the lock may be acquired. If LOCK_NB is included in operation, then this will not happen; instead, the call will fail and the error EWOULDBLOCK will be returned. RETURN VALUES
flock() returns: 0 on success. -1 on failure and sets errno to indicate the error. ERRORS
EBADF The argument fd is an invalid descriptor. EINVAL operation is not a valid argument. EOPNOTSUPP The argument fd refers to an object other than a file. EWOULDBLOCK The file is locked and the LOCK_NB option was specified. SEE ALSO
lockd(1M), chmod(2), close(2), dup(2), exec(2), fcntl(2), fork(2), open(2), lockf(3C) NOTES
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-thread applications is unsupported. Locks are on files, not file descriptors. That is, file descriptors duplicated through dup(2) or fork(2) do not result in multiple instances of a lock, but rather multiple references to a single lock. If a process holding a lock on a file forks and the child explicitly unlocks the file, the parent will lose its lock. Locks are not inherited by a child process. Processes blocked awaiting a lock may be awakened by signals. Mandatory locking may occur, depending on the mode bits of the file. See chmod(2). Locks obtained through the flock() mechanism under SunOS 4.1 were known only within the system on which they were placed. This is no longer true. SunOS 5.10 19 Jul 1994 flock(3UCB)
All times are GMT -4. The time now is 08:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy