07-06-2006
I guess I wasn't clear. HPUX (11.0) follows the POSIX.1 standard for fcntl.
http://www.opengroup.org/onlinepubs/...ons/fcntl.html
Please note the last paragraph that states why mandatory locking is not part of
the standard.
mandatory locking: locks enforced by the kernel on the open, read, write etc. system calls. Not based on fcntl. As long as the process calls fcntl first to get a lock, it's obeying the traffic cop rules. Mandaory locking does not allow circumventing the rules.
This is my take on it anyway, YMMV
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
how can I lock my keyboard while I'm away from the computer without using lock command. What other commands gives me the option to lock keyboard device?
thanks (7 Replies)
Discussion started by: dianayun
7 Replies
2. UNIX for Dummies Questions & Answers
Hi,
We have a lock file being created called lck8c0001 created in Unixware 2.1.2. This is locking a printer.
According to some websites, 8c0001 relates to the device name.
How does one link 8c0001 to those devices listed in the /dev folder?
I have done a ps -lp for all printers and have... (4 Replies)
Discussion started by: canman
4 Replies
3. Shell Programming and Scripting
Hi,
My requirement is to service a process and below is the script which i wrote for that and works fine, I have kept it in a crontab and running this everyminute, how do I lock this if its already running and i dont want to open if its running and not completed yet.
The crontab need to run... (4 Replies)
Discussion started by: strunz
4 Replies
4. Shell Programming and Scripting
hi
how can I Lock an account, by prepending ”*LK*” to the password field in /etc/shadow.
I dont want to use passwd -l .
Any idea? (3 Replies)
Discussion started by: tjay83
3 Replies
5. Solaris
Hi,
I am working with Sun-Solaris 9 and in our application I need to connect the UPS with Serial port,after that I need to monitor it..but before stating communication,It should lock that port,To check it,first i am trying to make sure the lock directory exists and I am able to find it(/var/lock)... (0 Replies)
Discussion started by: smartgupta
0 Replies
6. Red Hat
Hello all,
If anyone has time, I have a few questions:
How do I do the following in Linux. We are using Red Hat and Oracle Enterprise Linux, which is based on Red Hat too.
1. How to lock the account after a few (like 3) invalid password attempts?
2. How do you lock a screen after 30... (1 Reply)
Discussion started by: nstarz
1 Replies
7. UNIX for Advanced & Expert Users
Hi all,
I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...).
I'm trying to automate it with a shell script but in same cases I got the syslog broadcast message.
Is there any way to simply get a return code... (3 Replies)
Discussion started by: Dedalus
3 Replies
8. Shell Programming and Scripting
Hi,
I want to write a code where in the file once taken genrates a lock number and other developer/user cannot take the file to make any changes in it. He gets the file only as read only. (2 Replies)
Discussion started by: rac
2 Replies
9. Ubuntu
Hi All!
I am not able to lock my Ubuntu 12.04 LXDE.
Can anybody tell me the shortcut to lock the system.
I have tried all conventional keyboard shortcuts as well as buttons. (2 Replies)
Discussion started by: nixhead
2 Replies
10. Shell Programming and Scripting
Requirement:First i need to unlock the directory which i had a script for it.If i select app1 it should unlock the directory and after chnages in the script once need to lock the directory with lock command
The below highlighed variables in lock and unlock has to be changed according... (2 Replies)
Discussion started by: bhas85
2 Replies
fcntl(5) File Formats Manual fcntl(5)
NAME
fcntl - file control options
SYNOPSIS
DESCRIPTION
The function provides for control over open files. The include file describes requests and arguments to and See fcntl(2) and open(2).
The access modes set by and accessed by are:
The mask for file access modes is:
The file status flags set by
or and accessed by are:
Nonblocking I/O.
POSIX-style nonblocking I/O.
Append (writes guaranteed at the end).
Write through cache for data.
Write through cache for data and attributes.
Write through cache for data on reads and writes.
Write through cache for data and attributes on reads and writes.
When the filesystem is mounted as large files enabled, the
option allows the file to grow over 2 GB.
The flag is a synonym for and is defined for backward compatibility in
The flag values accessible only to are:
Open with file create (uses third open arg).
Open with truncation.
Exclusive open.
Do not assign a controlling terminal.
Do not traverse a symbolic link if it is the last component in the path.
The requests for are:
Duplicate file descriptor.
Get file descriptor flags.
Set file descriptor flags.
Get file flags.
Set file flags.
Get blocking file lock.
Set or clear file locks and fail on busy.
Set or clear file locks and wait on busy.
Fadvise service request (see
fadvise(2)).
The file descriptor flag for is:
The file segment locking control structure
includes the following members:
The file segment locking types are:
SEE ALSO
fcntl(2), fadvise(2), open(2).
STANDARDS CONFORMANCE
fcntl(5)