05-04-2012
AIX6.1 Remove file descriptor from specified process
Hi,
How to release file description area from specified process.
Problem is that process started - open one file ( ~2GB ) - file has been removed - process still shown that file is used by process and can't release space on filesystem.
It is not allowable to kill process !!!
Regs,
Krzysztof
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to find a way to check the current status of a file. Such as some cron job processes are dependent on the completion of others. if a file is currently being accessed / modified or simply open state I will wait until it is done being processed before attempting the next process on that... (3 Replies)
Discussion started by: Gary Dunn
3 Replies
2. UNIX for Dummies Questions & Answers
What is a file descriptor in Unix??
How to find a file descriptor of a file in Unix??
Does it have anything to do with the Inode numbers?? (3 Replies)
Discussion started by: rahulrathod
3 Replies
3. Programming
Hi,
look at the following code:
The client after estabilishing a connection with the server does the following:
if ((peter = fopen(argv, "r")) == NULL){
printf("errore\n");
exit(0);
}
... (11 Replies)
Discussion started by: teo
11 Replies
4. Programming
I have a requirement to close all the file descriptors from 3 to 1024 for a particular application.
Right now, this is how I do it ..
for ( int i = 3 ; i <= 1024; ++i )
close(i);
The change I am looking at is, I want to do away with the number 1024 and replace it with a constant which... (4 Replies)
Discussion started by: vino
4 Replies
5. Shell Programming and Scripting
Hello All,
Im opening a file desciptor in perl and sending data using print CMD "$xyz".
is there a limit to the length of the string that I can give to this CMD at a time. (3 Replies)
Discussion started by: rimser9
3 Replies
6. UNIX for Dummies Questions & Answers
Hi
What the below path contains?
/proc/<pid>/fd (1 Reply)
Discussion started by: siba.s.nayak
1 Replies
7. AIX
Hi guys,
This is my 1st post here. I tried to Google around but failed to get my solution. So I hope you guys could help me. (I have just a basic unix background for 2years so I'm sorry if im asking stupid questions)
OS - Aix 6.1, 64 bits.
Server - currently I only have telnet access to a... (12 Replies)
Discussion started by: pilotHans
12 Replies
8. UNIX for Advanced & Expert Users
Can any help me in finding the way to close opened file descriptor in Solaris ,without killing process. As accidently a file was removed which was opened by a process.
Much thanks in advance :) (11 Replies)
Discussion started by: nitj
11 Replies
9. UNIX for Advanced & Expert Users
is it possible to duplicate file descriptors(opened by a different process) with the help of dup or dup2. the two process do not share parent child relationship as well. (2 Replies)
Discussion started by: replytoshishir
2 Replies
10. Solaris
Hi ,
One of my zone went down and when i booted it up i could see the pool in degraded state with some check sum errors . we have brought the pool online after scrubbing. But few files are showing this error
Bad exchange descriptor
Please let me know how to remove these files (2 Replies)
Discussion started by: chidori
2 Replies
LEARN ABOUT HPUX
sem_close
sem_close(2) System Calls Manual sem_close(2)
NAME
sem_close - close a named POSIX semaphore
SYNOPSIS
DESCRIPTION
is used to close a named semaphore. A successful call to will do the following: Remove the process's descriptor for the semaphore refer-
enced by the specified structure sem. Remove the semaphore referenced by the specified structure sem, if the semaphore is marked for
removal by a call to and there are no other descriptors referencing this semaphore.
When the process's descriptor for the semaphore referenced by sem is removed, subsequent use of this semaphore by this process will fail.
Descriptors for named semaphores are also removed by processes on exit. Calling does not affect other processes referencing the same sema-
phore.
To use this function, link in the realtime library by specifying on the compiler or linker command line.
EXAMPLES
The following call to will close a named semaphore referred to by sem by removing the process's descriptor to the semaphore and removing
the semaphore if it is marked for removal by a previous and there are no descriptors referencing it.
RETURN VALUE
If the semaphore was closed and the descriptors referencing it were removed, returns 0 to the caller.
If the semaphore could not be closed, the call returns -1 and sets to indicate the error.
ERRORS
fails and does not perform the requested operation if the following condition is encountered:
[EINVAL] The argument sem is not a valid named semaphore.
WARNINGS
A single call will make the semaphore unusable by the process no matter how many times that process had called for the same semaphore.
Subsequent calls to by the same process for the same semaphore will result in an undefined behavior.
SEE ALSO
sem_init(2), sem_open(2), sem_unlink(2), <semaphore.h>.
STANDARDS CONFORMANCE
sem_close(2)