Programming :: C Code Fails On Repeatedly Opening /proc?

Jan 16, 2010

I am trying to run my code repeatedly in a loop about 50 times for timing measurement. I have C code running on ubuntu 8 on a single processor, Intel x86. My code is something like this

Code:
for (loop =0;loop<=50;loop++)
{
// other operations
pDir = opendir("/proc");
while (pDir == NULL)

[Code]...

After about 28-29 times the loop stops executing. I initially had a return -1 if I got pDir == NULL. That caused my program to exit, and I dont want that. Any clues on why this happens, and how I can circumvent this?

View 1 Replies


ADVERTISEMENT

Programming :: Kill Follow-on Code If Source Fails In Bash?

Dec 20, 2009

I have a Bash script that runs other bash scripts. If the parent code fails, is there any way for me to also kill the child code?That kills any multiple instances of a script if I run it more than once. Is there any way I can just modify this into something that prevents the child code from running/continuing from running if the parent stops from an error?

View 3 Replies View Related

Fedora Installation :: F15 Iso Burning Fails Repeatedly?

Jun 1, 2011

Fedora-15-i386-DVD.iso file, sha256sum is correct. Burning by k3b on a fedora14 system fails again and again at 98.4% of the burning. I downloaded again to another partition and the same happens again. The k3b-debug output:

[Code]...

View 1 Replies View Related

OpenSUSE Wireless :: Network - Repeatedly Fails To Make A Connection

Sep 26, 2010

Having just installed OpenSuse 11.3, NetworkManager identifies my wireless network, but repeatedly fails to make a connection. Without further ado, here are the outputs to commands requested in the first sticky thread:

[Code]....

View 7 Replies View Related

Fedora Installation :: An Error Occurred Mounting Device Proc As /proc: Mount Failed

Jul 6, 2010

I've got the F13 LiveCD that I was able to boot and use using the "nomodeset" boot option. From the desktop I'm trying to perform an Install to Hard Drive. I've read the Install from LiveCD post regarding the creation of a /boot partition and a / root partition. I've tried creating them without the LVM group and with. But every time I appempt to install I get...

An error occurred mounting device proc as /proc: mount failed: (9, None). This is a fatal error and the install cannot continue.

Hardware is a Sager 8887 (P4, 3.06HT, 60GB HDD, Radeon 9000 graphics adapter)

View 7 Replies View Related

Programming :: Selenium Java Code Into Equivalent Php Code?

Mar 30, 2011

I need to rewrite the selenium java code into its equivalent php code.

View 5 Replies View Related

OpenSUSE :: Opening Dolphin Fails About 40% Of The Time?

Jan 14, 2010

About 40% of the time when I try to open Dolphin (clicking the widget on the taskbar) I get launch feedback but it never opens Dolphin. If I then click it again, this time it will open. Where can I look in some log to find what error might be happening?

View 9 Replies View Related

Programming :: Way To Make Proc Filesystem Writable?

Jul 22, 2010

is there a way to make the /proc filesystem writeable? With aufs or unionfs i can't join the /proc filesystem with a writable directory directly. But i think it should work by using one of this file systems.If i try to join two dirs write-proc and virtual-proc Code: mount -v -t aufs -o dirs=/tmp/write-proc/:/tmp/virtual-proc/ none /tmp/joined-proc/ and afterwards make a bind mount /proc to virtual-proc Code: mount --bind /proc /tmp/virtual-proc/ i can't see any change in /tmp/joined-proc.

View 2 Replies View Related

Programming :: Write The Value To The Proc Entry In The Program?

May 1, 2011

I have a kernel module program which is used to create a entry in the proc file system. I have to read and write values in the entry. Its taken from a online tutorial stuff.how to write the value to the proc entry in the program ?

View 1 Replies View Related

Programming :: C Library Or Some Functions To Read Proc Filesystem

Dec 6, 2010

I have a requirement, to read the complete proc filesystem from the linux pc.. Does linux provide some functions to read the proc filesystem means the directories and files present in the filesystem.. in short I want to create a treeview of proc filesystem. and if a user selects the file in the proc.. I should show the contents in the respective file. So I want some library or functions to read the proc filesystem..

View 1 Replies View Related

Programming :: Check The Presence Of USB Using /proc Interface In A C Program

Feb 22, 2010

I want to check whether a USB is plugged in its slot from a C program. I want to make use of /proc interface for the same. During my reading i found that /proc/bus/usb/devices will tell how many USB devices are currently present.

So whether i can open this file and use stat call to identify whether the size is 0. If size is 0, i can assume no USB present. Else i can assume USB is present.

Whether my understanding correct. If USB inserted, how can i check the folders present in the USB stick.

View 2 Replies View Related

Programming :: Retrieve A Single String Or Value From /proc/cpuinfo

Oct 1, 2010

I'm trying to retrieve a single string or value from /proc/cpuinfo, but when I try to extract the model (not the model name) the model name comes with it, also it likes to print it twice...

Code:
model="`cat /proc/cpuinfo | grep model | cut -d: -f2 | cut -c1-3`"
echo $model

All i want this to do is spit out the model number once. (I need to pass it to another script)

View 14 Replies View Related

Programming :: Read Time Of /proc/net/tcp6 File

Dec 8, 2010

I am trying to read the /proc/net/tcp6 file of a huge server (chat server) for monitoring the tcp6 connection states.

My server's tcp6 file has more than 26000 lines. For monitoring the server connections, my monitoring tool has to read the /proc/net/tcp6 file quickly in a regular interval (5 secs) and process. Presently it takes minimum 6-7 seconds for reading the whole file.

My tool can able to read the normal file (26,000 lines) less than 1 second, but it is not possible to read the same size of proc file.

I have 2 questions:

1) Why proc file takes more read time than normal file?

2) Is there any way to read the /proc/net/tcp6 file more quickly?

View 2 Replies View Related

Programming :: Bash - Ps - Psgrep And Read /proc/$pid Make Script Exit

Mar 22, 2011

I have not been able to write bash to use a PID file to ensure no other instance of the same script is running! All three methods I can think of to see if the PID in the PID file is another instance of the script make the script exit with a return code of 1 but the same commands run at the command prompt work as expected.

The first attempt was:

Code:

The first attempted workaround was:

Code:

The second attempted workaround (with debug to make the following command prompt copy and paste meaningful) was:

Code:

Here's the command prompt session, testing with a stale PID file and then manually running the problem command and it behaving as expected:

Code:

This on Slackware64 13.1 which has bash 4.1.7.

In desperation I tried rebooting but the behaviour was the same.

View 2 Replies View Related

Slackware :: Kdestartupconfig4 Does Not Exist Or Fails - Error Code Is 127?

Nov 21, 2010

I got a problem with my Slackware installation after upgrading to slackware-current. I made a clean 13.1 install on my laptop, then I logged in as root, connected to the net and upgraded to slackware-current. Then, after rebooting, I try to log in to kde as root but I get this error:
Code:
kdestartupconfig4 does not exist or fails. The error code is 127. Check your installation. After getting these errors, I made a completely new fresh installation but I got the same errors again.

I even added another user with the adduser command just in case that was the problem but that didn't help. I can't log in to KDE.

View 8 Replies View Related

OpenSUSE Install :: Kstartupconfig4 Does Not Exist Or Fails (Error Code 1)

Nov 27, 2009

OS 11.2. When I try to log in my account I get the message {kstartupconfig4 does not exist or fails. The error code is 1. check}. I can only log in as root. As root, I check the file system and my files are there in /home/Myname. I can run all my programmes. The executable kstartupconfig4 is there.

View 9 Replies View Related

Slackware :: Id3-0.78 Homepage For Source Code 404 Error - Slackbuild Fails

Dec 19, 2010

I am trying to build abcde from slackbuilds.org and include needed packages like id3. When I went to build it I was unable to download the source from [url] and I get a 404 error in dutch. I was wondering if anyone had this issue or if there was another trusted place to grab the source code? I checked the archives of the slackbuilds-user mailing list to see if the issue is already known, but I didn't see anything.

View 3 Replies View Related

Debian Hardware :: Building RTL8187 Driver Fails - Error 2 Code

May 17, 2010

I am fairly new to Linux and have been striking hassles with my AWUS036H (RTL8187) under Debian Lenny. The standard (built in) driver works but reception is pathetic compared to the same card under Backtrack 4 or even Windows 7. I have tried to build drivers which I got from the Alfa website, the Realtek website and also the Linux Wireless project page. All of them fail during Make with an Error 2. I don't have the error in front of me (had to go back to Windows for the moment) but it is identical to the one this guy gets:

darkReaction:/home/georanson# cd /home/georanson/Desktop/Downloads/ndiswrapper-1.52
darkReaction:/home/georanson/Desktop/Downloads/ndiswrapper-1.52# make
make -C driver
make[1]: Entering directory '/home/georanson/Desktop/Downloads/ndiswrapper-1.52/driver'
Makefile:35: *** Cannot find kernel version in /lib/modules/2.6.18-6-686/build, is it configured?. Stop.
make[1]: Leaving directory '/home/georanson/Desktop/Downloads/ndiswrapper-1.52/driver'
make: *** [all] Error 2

I get the error 2 code and the reference to "kernel version".

View 5 Replies View Related

Programming :: Parse /proc Filesystem "files" For Results?

Dec 1, 2010

Im reading in file /proc/cpuinfo into a char array.Im using strstr to search for a string im interested in (the cpu speed line) and storing it in another char array.I want to just store the line that contains CPU speed but im getting everything after the CPU speed line in the char array too.Is there anything better than strstr or is there someway i can parse the the payload data (i.e. the actual cpu speed)

View 4 Replies View Related

Programming :: Opening A Network Interface?

Apr 29, 2011

Is there a way to open a network interface (that is not configured, yet), to send and receive some packets? The program will be running with root permissions.

View 11 Replies View Related

Programming :: Opening Ports With Perl?

May 12, 2011

im working on a perl script to automate the setup on a few machines. Does any one know how to open ports using perl?

ps: The systems are redhat so id be editing the iptables file..

View 6 Replies View Related

Programming :: Xdg-open: No Method Available For Opening?

Jun 30, 2011

I am not a programmer. But I feel safe enough to edit a file (afteracking it up of course.)I am using Arch with Enlightenment (E17.) I installed fwbuilder. Now when I click on the tutorial button it would not start my browser at all. The terminal gave this error;

Code:
/usr/bin/xdg-open: line 478: firefox: command not found
/usr/bin/xdg-open: line 478: mozilla: command not found

[code]....

View 2 Replies View Related

Programming :: Detect Opening Of A File Using A C Program?

Jul 19, 2011

how to detect if a file is being opened by any application so that i can block it just before opening it... Actually i am working on android and using iNotify in JNI to detect the OPENING of a file...but the file is getting opened before the iNotify detects it..and therefore its displaying the contents of the file unmodified .. The actual requirement is that if anyone is trying to open the file it should be modified by my program and then the modified file should be opened.

View 10 Replies View Related

Programming :: Opening A Serial Port From Interrupt?

Aug 17, 2010

I'm trying to open ttySx from an interrupt.the kernel crashes. is it possible to open/write to serial port from interrupts ? I think it crushes because when I try to open the device there is a mutex lock which cause the kernel to crash , am I right

View 2 Replies View Related

Programming :: Opening A Text File From Glade Interface?

Jan 26, 2011

opening a text file from glade interface.how?using c code

View 1 Replies View Related

Programming :: Opening A Text File With C++ Or Visual Basic?

Apr 29, 2010

I am a beginner at programming and have been given an assignment by my professor. Its a text file with lines of varying lengths. All I have to do is write a code to open the file and see the output in an excel sheet. Have been asked to use C/C++ or visual basic

View 5 Replies View Related

Programming :: Use SSE(2,3) In C/C++ Code?

Jun 6, 2011

I am working on a project with a lot of vector math and I'd like to find a way to speed it up.eading about SSE, but I've found no explanation on how to actually use it in code (was looking for some kind of hello-world example, complete with compilation instructions).Does the gcc compiler automatically make use of SSE, if you add the -sse(2,3) option on the command line? Or are their specific functions/libraries you need to call?

View 12 Replies View Related

Programming :: Code That Will Never Execute

May 23, 2011

Is there, by chance, a fancy name to describe code that must be in a program but will never be executed? In one of my (Haskell) programs, I have some error-handling code that must be in the program to keep the compiler happy (due to the type checking). However I know that, due to the logical structure of the program, it is impossible for the code to be evaluated. I am curious if there is a technical name given to code that must exist but cannot be executed.

View 6 Replies View Related

Programming :: GLX Code Won't Run Anymore?

Jan 14, 2011

I went to compile some "oldish" glx code. The code compiles great but when I go to run it I get a crash. With X Error of failed request: BadMatch (in .....running ddd causes my whole system to lock up when I call the glx function XOpenDisplay. After a few attempts I thought I'd download a demo from the net, I choose nehe opengl tutorial 2, I compiled and ran but even on a net tutorial I get the same error

./lesson02
XF86VidModeExtension-Version 2.2
Got Doublebuffered Visual!

[code]....

View 1 Replies View Related

Programming :: Translating Code To OSX?

Jul 20, 2011

I have the following code:

Code:
#!/bin/bash
function dx {

[Code].....

So essentially, it finds dx files, sorts them by numbers at the beginning, then performs the dx function I made (loops over all of the #-protein.dx and #-water.dx files).

It works fine when I'm running it on Ubuntu 11.04. However, when I try to run it on OSX, I get the following error:

Code:
mh320m01:DA_R02 janickij$ ./MOD_Loop_Tuber_Script.sh
find: illegal option -- t
find: illegal option -- y

[Code]....

View 9 Replies View Related







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