03-19-2009
refer the flock manual.
flock is a system call to lock files.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a set of scripts to do software releases to remote machines which uses ftp. I'm having a problem getting 'lost connection' messages.
What I wanted to ask is, does ftp employ some sort of file locking if two ftp processes are trying to copy the same file at the same time? & if so could... (2 Replies)
Discussion started by: Kevin Pryke
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Simple question but I just need to confirm the answer:
If two or more processes attempt to move the same file at exactly the same time, will unix internal file locking allow only one of the processes to access the file?
Many thanks
Helen :) (2 Replies)
Discussion started by: Bab00shka
2 Replies
3. UNIX for Dummies Questions & Answers
Hi
I would like to lock a file using korn Shell Script before coping the contents of the file.
Do let me know
Thanks in Advance.
Senone (3 Replies)
Discussion started by: senone
3 Replies
4. UNIX for Advanced & Expert Users
Hi,
Does anyone know what happens when two processes are simultaneously trying to write to a single file in UNIX (AIX)?
Cheers (1 Reply)
Discussion started by: penfold
1 Replies
5. UNIX for Dummies Questions & Answers
We want to lock a file, during a program(pgm1) execution(until the execution of the program is completed), so that other program(pgm2) can't read/edit that file, until execution of earlier program(pgm1) is completed. How can this be achieved thru shell scripting...
we tried chmod +l option, but... (1 Reply)
Discussion started by: thanuman
1 Replies
6. UNIX for Dummies Questions & Answers
how do i implement file locking in unix?
example if i want to update a file, i would like to use file locking. how do i implement it?
i am using shell script
thanks (3 Replies)
Discussion started by: yang
3 Replies
7. UNIX for Dummies Questions & Answers
how to ensure all files are being locked while updateing some files?
example when i want to update the password and shadow file in unix. how do i implement file locking??
please advice
thanks (2 Replies)
Discussion started by: yang
2 Replies
8. Solaris
Hello,
I ls -al to see the permission of a file and there is 1 file have strange permission. It's a "l" instead of "x".
-rwxr-lr-x 1 root other 24905 Jan 11 2007 /etc/vx/isis/Registry.pre-ddlpro
-rw-r-lr-- 1 root root 0 Jan 6 43:25... (2 Replies)
Discussion started by: Smith
2 Replies
9. UNIX for Advanced & Expert Users
All,
Just wondering if someone has a file open on client A for writing and it is locked, is that file still readable from client A or B?
Basically I'm just wanting to know if a file is opened already, can it still be opened for read only? (1 Reply)
Discussion started by: markdjones82
1 Replies
10. Emergency UNIX and Linux Support
Got a weird problem.
I have a user that inherited a data processing system written in Perl. The system consists of about 150 Perl scripts and about 40 Fortran executables.
The system had been working fine until recently, when I changed our file server configuration.
First the system... (2 Replies)
Discussion started by: ccj4467
2 Replies
XChangeKeyboardDevice(3X11) X FUNCTIONS XChangeKeyboardDevice(3X11)
NAME
XChangeKeyboardDevice - change which device is used as the X keyboard
SYNTAX
Status XChangeKeyboardDevice(display, device)
Display *display;
XDevice *device;
ARGUMENTS
display Specifies the connection to the X server.
device Specifies the device to be used as the X keyboard.
DESCRIPTION
The XChangeKeyboardDevice request causes the server to use the specified device as the X keyboard. The device must have been previously
opened by the requesting client via XOpenDevice or a BadDevice error will result. The device must support input class Keys, or a BadMatch
error will result. If the server implementation does not support using the requested device as the X keyboard, a BadDevice error will
result.
If the specified device is grabbed by another client, AlreadyGrabbed is returned. If the specified device is frozen by a grab on another
device, GrabFrozen is returned. If the request is successful, Success is returned.
If the request succeeds, a ChangeDeviceNotify event is sent to all clients that have selected that event. A MappingNotify event with
request = MappingKeyboard is sent to all clients. The specified device becomes the X keyboard and the old X keyboard becomes accessible
through the input extension protocol requests.
XChangeKeyboardDevice can generate a BadDevice or a BadMatch error.
DIAGNOSTICS
BadDevice An invalid device was specified. The specified device does not exist, has not been opened by this client via XOpenInputDevice,
or is already one of the core X device (pointer or keyboard). This error may also occur if the server implementation does not
support using the specified device as the X keyboard.
BadMatch This error may occur if an XChangeKeyboardDevice request was made specifying a device that has no keys.
SEE ALSO
XChangePointerDevice
Programming With Xlib
X Version 11 Release 6 XChangeKeyboardDevice(3X11)