Programming :: Get File Descriptor Of An Already Opened File?

Jul 20, 2011

Is there any method to get the file descriptor of a file which is already opened by some other process?

Or any method to get the File descriptor from the filepath ?

View 2 Replies


ADVERTISEMENT

Programming :: Pyhon - Get The File Descriptor?

Apr 19, 2011

I create two script file name for "a.py" and "b.py", It's through socket connection.
a.py's file writeing "os.pub(s.fileno,x)"create the file descriptor,but i don't know how to get the descriptor file with "b.py"

View 2 Replies View Related

Programming :: What Does Closing A File Descriptor Mean

Mar 13, 2011

As we know, every process has a table with a file descriptor table, in which each entry contains a file pointer pointing to the corresponding file table which contains a v-node pointer pointing to the v-node table.

When closing a file descriptor, are all these data structure deleted?

View 2 Replies View Related

Programming :: PyGTK: Send Output From A File Descriptor To A Textview?

Jul 22, 2010

Within PyGTK I'm using gobject.spawn_async to launch a bash script. I would like the output of that bash script to be displayed within my application. I have a textview set up to receive the text ...

Here are the commands that launch the program:

Code:
def run_command(command):
global keep_pulsing
keep_pulsing=True
(cpid, cstdin, cstdout, cstderr) = gobject.spawn_async(command,flags=gobject.SPAWN_DO_NOT_REAP_CHILD|gobject.SPAWN_STDERR_TO_DEV_NULL,standard_code....

Here are the two callback functions. But like I say ... I have no idea how to get that data from the 'cstdout' file descriptor into a textbuffer.

Code:
### THE FOLLOWING ARE GLOBALS:
textview = wTree.get_widget('textview1')
textbuffer=textview.get_buffer()
def update_textview_callback(fd, condition):
global keep_pulsing
if keep_pulsing:
progressbar.pulse()
code....

View 3 Replies View Related

General :: Open Local File Error When Creating File Descriptor?

Sep 14, 2009

error message when I ran my program that I couldn't open my local file. I have two files first one is called client, second one is called server I am using named pipes to sent a message from client to the other file called server in client I used mknod() to create the two named pipes,one for read,one for write and created new thread in client using fork() spawned a child process that executed the server file both named pipes are opened the client file got the message from the user and sent it through the named pipes to the server file when the server receives the message , it needs to verfify it is correct in the server file, a local file descriptor is created to read and send this verifing message when it is not correct but I am getting an OPEN() error when I tried to open this shared local array buff and attach it to a file descriptor where the message is kept why do I get this error in server file

int main()
{
/*both named pipes are open*/
rfd=open(IFIO1,0);
wfd=open(IFIO2,1);

[code]....

View 1 Replies View Related

Programming :: Know Which File Under The Folder Is Being Opened / Created For Writing?

Apr 23, 2010

My program need to monitor the foler to know which file under the folder is being opened/created for writing. I add the folder into watch list using inotify_add_watch, when a file -- say 'AA' -- is created, I'll get the event through read api call. But the inotify_event only have file name 'AA' and a event mask. these parameters can't help me to know how the 'AA' is created/openned. So I have to scan the /proc folder to get to know how is 'AA' created/openned. I don't think this is a efficient way, especially if there are lots of files are openned/created in a short time span.

View 3 Replies View Related

General :: File Descriptor Redirection And Duplication?

Mar 3, 2010

i've checked the link, and it makes it better. but it doesn't include all the information. i'll continue searching the internet. However i have seen an example of creating a fd:

Code:
exec 5<&1
echo "TEST" >&5
exec 5>&-

as in the page, this was intended to redirect the stdout to the fd 5 and create it, and close it. i have the following questions:- what is exactly the meaning of second command? is it to redirect the command stdout "test" to the fd 5? and how i can see the contents of the fd 5? - in the first command, why the < is used instead if > and what is the difference between the below two commands as in the info bash *Redirection section It will be helpful if anyone could include a graph for file descriptor before and after different command execution.

[Code]...

View 5 Replies View Related

General :: Command For Short File Descriptor?

Jun 25, 2010

the short file descriptor of an ISO file. I have been assigned with a task to match the short file descriptor of an ISO file(to be provided to the customer) to check if thats "Kudgo Support tools" or not.What linux command should I use?

View 6 Replies View Related

General :: Input To Sudo - What Is Its File Descriptor

Aug 5, 2011

Where does input to sudo go? I mean when we give password to sudo prompt where it actually goes? If it goes to a file what is its name or what is its file descriptor?

View 1 Replies View Related

Server :: Can Define Max Limit Of File Descriptor

Jul 7, 2009

We are facing problem of to many file open error because of that application become slow and in tomcat catalina log we get following error frequently Jul 6, 2009 12:27:57 PM org.apache.tomcat.util.net.JIoEndpoint$Acceptor run SEVERE: Socket accept failed

at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)

[code].....

no file limit,file descriptor limit for 300 user of tomcat application server and also oracle database server?

View 11 Replies View Related

Software :: Bad Tty & File Descriptor Error While Building RPM On F13

Dec 20, 2010

I have an FC13 x86_64 server and having trouble building RPMs, but I don't think it's specifically an RPM problem. I think it's a tty management or other type of problem.

When spec files have a "%files -f filelist.txt", which contains the list of files for the RPM, it calls the /usr/lib/check-files script, which sorts the files that are supposed to be in the RPM and compares them with the files that are in the built RPM before they are packaged.

The trouble is that the sort fails.

Here's the trace from the check-files script:

The above doesn't show that the output from sort is redirected into those /tmp files. The first sort succeeds because it reads data sent by the "find" in the same shell. The second sort fails because (I think) it cannot read data from stdin for some reason.

What could possibly cause this? I've checked various permissions, libraries, even used strace extensively, all of which is inconclusive.

This is one of my test server boxes, so this problem is something that I've caused, but I have no idea what.

libc controls input and output, correct? Could it somehow be a glibc problem, or a devpts problem? I can run a simple command and pipe it to sort with no problem. It appears to only be related to sub-shells.

I also replaced sort with cat and just tried to redirect stdin in that file to a temporary file, and that also fails.

I've tried running it with selinux disabled and that has no effect.

View 7 Replies View Related

Ubuntu Multimedia :: Starting Jack - Bad File Descriptor

Dec 10, 2010

I am having problems starting jack everytime I try to start it either says bad file descriptor a bunch times or it wont connect to server as client sometime. Other times It just say sorry cannot start jack.

View 1 Replies View Related

SUSE :: Get File Descriptor From Major And Minor Number?

Nov 15, 2010

Is it possible to get a file descriptor from the major and minor number. If so, how can this be done? I am trying to see if a port(eg ttyS2) is opened without using the fdopen or open or fopen functions. is there a way to get the file descriptor of file or port that as already been opened, without using the functions I mentioned above. These functions reopens the port. I am trying to avoid that.

View 3 Replies View Related

Ubuntu Servers :: Maximum Of 1024 File Descriptor Limit?

May 4, 2011

I'm running nginx for static files and as a proxy server for a comet IM server on ubuntu Jaunty. On high load I'm hitting a limit of 1024 file descriptors. I've tried increasing this limit but still can't pass 1024. Does "more /proc/sys/fs/file-nr" gives me the global count of used file descriptors? Why do I see a maximum of 1024 open file descriptors in /proc/sys/fs/file-nr if this is the global count for the machine and each user should have at least 1024 allowed file descriptors by default? Is there a way to increase the limit while the server is running?

Some relevant info on my server:
sudo more /proc/sys/fs/file-nr
1024038001
sudo sysctl fs.file-max
fs.file-max = 38001
sudo nano /etc/security/limits.conf
...
* hard nofile 30000
* soft nofile 30000

I also added this to /usr/local/nginx/conf/nginx.conf:
worker_rlimit_nofile 10240;
Uncommented the following line in /etc/pam.d/su:
session required pam_limits.so

View 1 Replies View Related

Ubuntu :: Mplayer Once Opened A File

Feb 22, 2011

I have this wma file that I want to play and I looked around and found alot of ways to make this happen. However, none has work for me. But first let me explain my problem. I have these wma files that just wont work but they worked once before. Now when I try to open the files all I get is some message that the file can not be opened. I have done many efforts to make it work including things like medibuntu. BTW, there was this once moment that when I tried to open the file it PLAYED! but then after it did not open.

View 3 Replies View Related

Ubuntu :: ZIP File Cannot Be Opened As Archive

Jun 20, 2011

I'm not 100% sure if this is the right spot for it, but I'm having trouble unzipping files. I've downloaded a good few fonts from dafont.com, from different authors and with different browsers and I still get errors. First I opened the .zip with Archive Manager

Code:
7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=en_ZA.utf8,Utf16=on,HugeFiles=on,2 CPUs)
Error: /media/42E6F8E2366C0906/Fonts/panhead.zip: Can not open file as archive
Errors: 1

I then tried
Code:
ross@Ross-PC:~$ unzip /media/42E6F8E2366C0906/Fonts/panhead.zip
and got this output
Code:
Archive: /media/42E6F8E2366C0906/Fonts/panhead.zip
End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive.
unzip: Cannot find zipfile directory in one of /media/42E6F8E2366C0906/Fonts/panhead.zip or /media/42E6F8E2366C0906/Fonts/panhead.zip.zip, and cannot find /media/42E6F8E2366C0906/Fonts/panhead.zip.ZIP, period.

I do have p7zip-full installed, but it isn't a .7zip file?

View 8 Replies View Related

General :: Tell GEDIT To Reload Currently Opened File?

Jul 29, 2010

I am using GEDIT and I would like to have a shortcut key that allows me to tell GEDIT (on Ubuntu) to force reloading from file system the currently opened file.

How can I do that?

View 3 Replies View Related

Ubuntu :: Mkv Video File Cannot Be Opened By The Mplayer?

Jun 5, 2011

-The Mkv video file cannot be opened by the Mplayer due to something that I don't know. I try to open it via the gnome-terminal and end up with something like this:

The, I try to play it with VLC media player. Everthing seems fine but after few minutes, I can see the lagging of the video and distractions on the screen.

Then, I've open my Windows 7 and play the mkv files with the KMplayer, everything is fine. No lagging, no distractions.

I've already updated the ubuntu-restricted-extras. I've already installed the libxine1-ffmpeg and nothings good appeared.

I've already installed the mkvtoolnix-gui (which is i don't know what is it) but similar prob appear.

how did play mkv files? With no lags or disctractions?

View 1 Replies View Related

General :: Desktop Configuration File Cannot Be Opened?

Oct 14, 2009

i am not able to open desktop configuratuon file in open suse 11.1.i think it could be due to absence of pluggins etc.

View 3 Replies View Related

Fedora Servers :: Executive File Cannot Be Opened / Solve This?

Feb 4, 2009

I have a server installed with a Fedora 8 and the other client PC were installed with Windows XP. Recently, I copied an educational courseware (this courseware is developed specially for Windows based PC) into the Linux-based server. I found that the .EXE (application file) :were unable to be opened in all of the clients and also the server. How can I solve this problem?

View 7 Replies View Related

General :: Recover Deleted File If It Is Still Opened By Some Process?

May 13, 2011

$ cat important_file > /dev/null &
[1] 9711
$ rm important_file

[code]....

View 2 Replies View Related

Red Hat / Fedora :: Any Limitation On Number Of File Descriptors That Can Be Opened

Dec 23, 2008

Is there any limitation on the number of file descriptors that can be opened. If yes how to find the maximum number of file descriptors that can be opened at a time.

View 2 Replies View Related

Ubuntu :: E: The Package Lists Or Status File Could Not Be Parsed Or Opened

Dec 5, 2010

E: Read error - read (0: Success)
E: Problem closing the gzip file /var/lib/dpkg/status - close (0: Success)
E: The package lists or status file could not be parsed or opened.

View 1 Replies View Related

Ubuntu :: Synaptic Manager - Status File Could Not Be Parsed / Opened

May 7, 2011

When I am opening the synaptic manager its showing the following error:
E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.
E: _cache->open() failed, please report.
So How can I open it?

View 1 Replies View Related

Ubuntu :: The Package Lists Or Status File Could Not Be Parsed Or Opened?

May 22, 2011

I keep getting this messageCould not initialize the package informationAn unresolvable problem occurred while initializing the package information.Please report this bug against the 'update-manager' package and include the following error message:'E:Encountered a section with no Package: header, Eroblem with MergeList var/lib/apt/lists/us.archive.ubuntu.com_ubuntu_dists_natty_main_bina ry-i386_Packages, E:The package lists or status file could not be parsed or opened.'

View 2 Replies View Related

Ubuntu :: Error - E: The Package Lists Or Status File Could Not Be Parsed Or Opened.

Mar 19, 2010

Looks like my package manager was severely screwed. Any package manager-related command I try to run results in the following message in the console:

Code:

E: Read error - read (5: Input/output error)
E: The package lists or status file could not be parsed or opened.
Anything - aptitude, apt-get.

I removed all my sources.lists, I tried running apt-cache clean It didn't help. This is really serious. Not only am I unable to do anything with packages (update, remove, install), but the machine is really slow because of this.

View 9 Replies View Related

Ubuntu :: Gnumeric Argues \ Opened It And Then Get A Dialog Warning Me The File Already Exists?

Dec 22, 2010

Whenever I edit a spreadsheet in Gnumeric, I have to have an argument about saving the edited version. First, it says it wants to save it in Gnumeric's XML format instead of whatever format I opened it in, and then I get a dialog warning me the file already exists,is it OK to overwrite it? All my spreadsheets are either .odt or .csv. I just want to be able to open, edit and save without an argument every time. It's like telling a child that it's bed time and having the same argument every night, and it's getting on my nerves.Is there a setting where I can get gnumeric to obediently save the edited version, or do I just have to put up with the slower opening times of LibreOffice instead?

View 4 Replies View Related

Ubuntu Installation :: E: The Package Lists Or Status File Could Not Be Parsed Or Opened

Dec 27, 2010

i have this error and i cant open synaptic pakage manager

Code:

sudo apt-fast update

Code:

kato@kato-G31M-ES2L:~$ sudo apt-fast update
Hit http://security.ubuntu.com maverick-security Release.gpg
Ign http://security.ubuntu.com/ubuntu/ maverick-security/main Translation-en

[code]...

look here what this suppost to mean ?

Code:

Reading package lists... Error!
E: Problem parsing dependency Depends
E: Error occurred while processing python-glade2 (NewVersion2)
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.

View 1 Replies View Related

Ubuntu :: File Manager Location Bar At Top Disappears Every Time Closed / Re-opened

Jun 17, 2011

the location bar at the top disappears every time I close and then re-open it, and I have to hit View/Location Bar to get it back. Is there a way to permanently keep it there?

View 2 Replies View Related

Fedora Installation :: Error - The File Upstart-sysvint.0.65.9.fc14.i686.rpm Cannot Be Opened

Nov 20, 2010

it's the installation media or the ISO is broken because i have reburned / redownloaded the fedora14 multiple times with the same result. I even tried burning the disc on a different computer just to make sure the burner is still working. This is the error i am getting when the "Starting installation Process" dialog displayed.

"The file upstart-sysvint.0.65.9.fc14.i686.rpm cannot be opened. This is due to a missing file, a corrupt package or corrupt media. Please verify your installation source" I remember fedora 13 and below i have to use nousb command or something similar to get fedora installed properly but not for fedora 14. It just pops up with the message above.

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved