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


ADVERTISEMENT

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 :: 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 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 :: Remote Client Mac Address On Socket Descriptor?

Dec 14, 2010

I want to get the connected client MAC Address after accept() call. I can get the IP address of the client but i don't know how to get the client MAC Address in my this programme. Here I am Posting my Code.

#include<stdio.h>
#include<sys/socket.h>
#include<sys/types.h>

[code]....

View 10 Replies View Related

Programming :: Fetch The Remote Client Mac Address On Socket Descriptor?

Dec 14, 2010

I have written one simple code which is posted here. i want to fetch the Mac Address on socket descriptor which is returned after accept () call.

Code:-

#include<stdio.h>
#include<sys/socket.h>
#include<sys/types.h>
#include<netinet/in.h>

[code].....

View 1 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

Red Hat / Fedora :: Loading PBR For Descriptor 3?

Apr 26, 2010

After a motherboard failure and replacement a Dell PE 6850, during the first restart, we receive this on running RHEL 4.5: Loading PBR for descriptor 3...done. Bad PBR Sig. Also, I have determined PBR to mean "Partition Boot Record." I have not been able to determine what "descriptor 3" is.

View 3 Replies View Related

Fedora :: Usb 2-1: Device Descriptor Read/64, Error -62

Apr 23, 2010

I tried to get 3d hardware support in my FC12 install. I grabbed the latest appropriate drivers from the nvidia website for my Geforce 6800 XT graphics card. I changed the inittab file to boot to command line, ran the .run file as root and ran into a couple errors doing so.

I then proceeded to use yum (which i do like but this is a bad scenario for me thus far) to update my drivers to the suggested kmod-nvidia drivers that exist out there. Once all of the installation was completed I rebooted and got the following error displayed at the top of my screen after the fedora loading bubble disappeared. The system just seems to hand at this point....

"usb 2-1: device descriptor read/64, error -62"

I did a hard boot on the machine and tried again, this time i pressed the esc key to watch the interactive startup screen and noticed that after "enabling local filesysem quotas: [ OK ]" i get a

***Warning -- SELinux targeted policy relabel is required.
*** Relabeling could take a very long time, depending on file
*** system size and speed of hard drives.

This will continue with asterisks across the screen until eventually it stops and then I am stuck as to what to do from here on out. What could possibly be causing all of this mayhem?I have tried to use the fedora core 12 install cd to launch it into "rescue mode" and from the bash command line proceed with modifying my grub.conf to not use the "newly installed kernel (2.6.32.11-99.fc12.i686)" that was installed with yum during my kmod-nvidia driver installation.

View 1 Replies View Related

Ubuntu :: Config Failed - Cannot Read Hub Descriptor

Mar 2, 2011

I have a recent install of ubuntu 10.10 on a brand new rig, and everything appears to be working properly but I get these 2 errors during bootup that seem to make the book process take a bit longer than expected but haven't actually noticed a problem in performance.

[6.394416] hub 3-1:1.0: config failed, can't read hub descriptor (err -22)
[6.752860] hub 3-2:1.0: config failed, can't read hub descriptor (err -22)

I have been unable to find a site with information on what err -22 means. From what little I have found on the issue it seems to be something with the usb 3.0 hubs on the back of my motherboard?

Code:
[0.864023] PCI: Using ACPI for IRQ routing
[0.864024] PCI: pci_cache_line_size set to 64 bytes
[0.864081] reserve RAM buffer: 000000000009dc00 - 000000000009ffff
[0.864082] reserve RAM buffer: 00000000df7e0000 - 00000000dfffffff
[0.864083] reserve RAM buffer: 000000021f800000 - 000000021fffffff
[0.864120] NetLabel: Initializing
[0.864121] NetLabel: domain hash size = 128
[0.864122] NetLabel: protocols = UNLABELED CIPSOv4
[0.864127] NetLabel: unlabeled traffic allowed by default ....

View 1 Replies View Related

Fedora :: Error - No Editor Descriptor For Id Org.eclipse.jdt.ui.CompilationUnitEditor

Jan 4, 2010

I recently updated eclipse 3.5.1.-27 I am getting the following error. No editor descriptor for id org.eclipse.jdt.ui.CompilationUnitEditor I am using sun jdk. I reinstalled it and tried to start. Same problem. When I try to open projects its not showing any java related things.

View 2 Replies View Related

Ubuntu :: Lucid Kernel - Device Descriptor Errors

Apr 11, 2011

For the record, I'm having the same issue as the OP with Lucid with a backported 2.6.35-28 kernel and a Samsung scx-4623fw printer hooked up via USB. Same symptoms - lsusb hangs until the printer is unplugged, devices aren't recognized, etc. Dmesg output includes a bunch of device descriptor errors:

[603.091961] usb 7-1: new full speed USB device using ohci_hcd and address 9
[618.241335] usb 7-1: device descriptor read/64, error -110
[633.521986] usb 7-1: device descriptor read/64, error -110

I suddenly started having a bunch of USB issues (including complete system locks whenever I plugged in a logitech USB mic) around early march with the stock lucid kernel. Everything was fine before that.

View 4 Replies View Related

Software :: Recover Data From DVD With Broken Volume Descriptor?

Oct 14, 2010

I have a multisession DVD-R with an unreadable volume descriptor caused by a bad DVD burning using growisofs. The DVD is not physically damaged. I tried to recover the data reading directly from /dev/hdc but it throws an input/output error. I believe the error is caused by the broken volume descriptor. That's why I'd like to know a way to make a low-level DVD image that doesn't use the volume descriptor.
Once I have the image I'll manage to recover the data, but now i can't access anything at all. By the way, i've already tried all this programs and anyone worked:

CD-DVD Data Recovery
JuiceSoft Bad CD DVD Recovery
burnaware

[code]....

View 5 Replies View Related

CentOS 5 Hardware :: USB Device Descriptor Read Errors

Aug 20, 2010

I'm designing an embedded USB device. When I connect the device to the computer, I get the following messages:

usb 1-3: device descriptor read/64, error 2
usb 1-3: device descriptor read/64, error 2
usb 1-3: device descriptor read/64, error 2
usb 1-3: device descriptor read/8, error -71
usb 1-3: device descriptor read/8, error -71
usb 1-3: device descriptor read/8, error -71

Note that other USB devices work fine. I am fairly certain that the problem is with my hardware. I'd like info on what these error messages mean to help my debug. Searching Google I wasn't able to find any explanations about what these errors mean exactly.

I'm running Cent OS 5.4 with kernel 2.6.18-164.el5 on an i686

View 1 Replies View Related

CentOS 5 Hardware :: Device Descriptor Read/64, Error -110

Feb 2, 2011

I'm having issues with getting my USB ports to work on my server. USB keyboards, mice, drives, flash drives, card readers, etc. will not work on this server.

dmesg
Linux version 2.6.18-194.32.1.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Wed Jan 5 17:53:09 EST 2011
BIOS-provided physical RAM map:

[code]...

View 4 Replies View Related

Software :: Filesystem Corruption - Ext3-fs Group Descriptor Corrupted - No Inittab

Mar 3, 2011

When I rebooted my system (RHEL 5.3 x86_64), I got the following error when it was booting up:

Code:

Full screenshot of the bootup error messages here: previous bootup error

So to try and fix this, I booted from the OS disk and did a linux rescue.

Here's some of the results of the commands I did:

Code:

Here's a screenshot of the output from fsck after it's done, notice it says 0 bad blocks but the system was modified:fsck results

I then reboot but now I get the errors:

Code:

Full screenshot of the startup errors I get now here: current bootup error

Does anyone have any ideas on how I can fix this? Was the fsck I did initially the correct thing to do to fix that initial group descriptor error or did I make things worse?

View 1 Replies View Related

Programming :: Socket Programming While Displaying Received Message In File

May 11, 2011

i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....

Code:
/* tcpserver.c */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
[Code]....

now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..

View 2 Replies View Related

Debian Configuration :: USB Errors "usb 1-5: Device Descriptor Read/64, Error -110"

Sep 3, 2010

While I had the case open to swap out a network card I thought I would drop in an old USB card (previously used with no problems on a machine running Debian) however on boot I'm now getting some errors showing up. The card has been sitting around for a while so it could be an issue with the card.

[Code]....

View 2 Replies View Related

CentOS 5 :: Booting 5.4 - Error "EXT3-fs: Can't Read Group Descriptor 3"

Apr 3, 2010

I have been using CentOS 5. for around 3 months. It was all fine and was having a pleasant experience using CentOS. Today when i turned on my computer and booted CentOS i am having the below error: Grub comes up, allows me to select CentOS 5.4 kernel image. and displays RedHat Nash version: and then the below error occurs:

[Code]....

View 9 Replies View Related

Programming :: OpenCV Programming - Highgui.h: No Such File Or Directory?

Jul 1, 2010

I installed OpenCV and am trying the example programs. When I try to compile like in the tutorial it is not finding highgui.h.I have 64 bit Mint if that helps at all

View 3 Replies View Related

Programming :: Define All Variables In Tcl Programming In A File For Instance Var.cfg?

Apr 27, 2010

I can define all variables in tcl programming in a file for instance var.cfgand source the same file in my tcl script such assource var.cfgIs this possible in perl too?

View 3 Replies View Related

Programming :: Bash File Comparing - Report How Many Matching Words My Main File ?

Jun 9, 2009

I have been messing with diff and grep for 2 days now without result

I am trying to match a file consisting of words to many separate other wordfiles in a specific directory. one by one.

What i want the script to do is to report how many matching words my main file has with every file in the directory, each in turn

setup:

Each of em are plain text files with 1 word per line

Output should be something like:

SCRIPT REPORT:

View 8 Replies View Related







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