Programming :: C - Semaphores, Initiate Semaphores Seems To Be Failing?

Jun 28, 2010

I'm running the following code to initiate semaphores:

Code:
int init_semaphore(key_t semkey, int nsems)
{

[code]...

View 3 Replies


ADVERTISEMENT

Programming :: Stop Semaphores In C?

Feb 26, 2011

i'm writting a program, that creates semaphores and shared memory. It asks from the user to give anything to write in the shared memory. Now, i want this program to do this,not only once, but repeat, and stop as soon as the user gives the word "quit". i added a while loop, but i don't know how to stop the program.

View 13 Replies View Related

Software :: Posix Semaphores Posting For More Than One Thread At A Time?

Apr 12, 2011

I would like to know can we post more than one thread at a time.I have code like below

Code:
#include <stdio.h>
#include <unistd.h>

[code]...

View 2 Replies View Related

Programming :: Select Options From Website To Initiate Download From Script

Nov 18, 2010

I usually use wget to download stuff from websites when scripting.I have a new requirement that requires me to authenticate then select some options to execute the download. How would I go about this? First thing that comes to mind is using keyboard macros in the Windoz world but I need to do this in bash or perl.

View 1 Replies View Related

Programming :: C++ Failing To Pass By Value?

Jan 25, 2010

I have a strange problem with a simple program. I have a container class that holds a pointer. I did this so I could use another container class that does several pass by value calls. I didn't want to be copying the object over and over again, so decided to build this simple container that simply copied the pointer in the copy constructor.

However, the pass by value call seems to be failing in a strange way. When the pass-by-value function is called, the program jumps into the copy constructor just fine and performs the pointer assignment operation. The program will copy the pointer value 0x20 (for argument sake) to the "this->base" location. Within the copy constructor, this has the address 0x28. Then when it jumps into the function, instead of pass by value argument being at 0x28 (as expected), it is at 0x36. Then 0x36->base has the address 0x28. Thus the base is now pointing at what was the new pointer container. At this point the data is corrupted and random things happen.

It seems that there is some strange assignment and double nesting going on. I really do not understand what is going on.

Below is some code. I have stripped away all the other code trying to isolate the problem. I have added comments explaining what my debugger is telling me.

Code:
using namespace std;
class paramPnt // Need to determine how order is tracked
{
private:
long order;

[Code].....

View 4 Replies View Related

Programming :: Run Cgi As Root Using Setreuid Failing

Nov 16, 2010

I'm calling a cgi-script on an apache webserver. The script needs to create a textfile and write certain values into it. When I do:

Code:
static const std::string outputFile( "/flash/myfile.ini" );
std::fstream fileStr( outputFile.c_str(), ( std::fstream::out | std::fstream::trunc ) );
if( !fileStr.is_open() )
{
throw std::runtime_error( "Failed to open config file." );
}
The runtime error is always thrown.

So I wish to run this cgi as root by doing this:

[Code]....

View 1 Replies View Related

Debian Programming :: ANT Script Task Failing

Mar 8, 2010

Using ant with

Code: Select all<script language="jython" manager="auto">

is failing

BUILD FAILED
/root/dawndusk/times_build.xml:25: Unable to create javax script engine for jython
at org.apache.tools.ant.util.optional.JavaxScriptRunner.evaluateScript(JavaxScriptRunner.java:86)
at org.apache.tools.ant.util.optional.JavaxScriptRunner.executeScript(JavaxScriptRunner.java:69)

I have ant-optional installed. Do I need to register specific languages?

Apache Ant version 1.8.0 compiled on February 20 2010

Detected Java version: 1.6 in: /usr/lib/jvm/java-6-openjdk/jre

View 1 Replies View Related

Programming :: Lighttpd Startup Script Failing?

Aug 4, 2010

I am using Ubuntu 9.04Following is a startup script I am trying.

Code:
#!/bin/sh
USER=lighttpd

[code]....

View 3 Replies View Related

Programming :: Typeset -i Failing And Return Exit Code 1

Nov 18, 2010

I have this command in ksh:

1. typeset -i INTEGER INTEGER=aaa In all platforms except of Linux it is failing and return exit code 1 Why in Linux it is not failing? I must it for my number tests

2. The same for printf command. Only in Linux the bellow command is not failing: printf "%d" aaa

View 7 Replies View Related

Programming :: C++ List Regular Files Function Failing Inconsistently?

Mar 28, 2011

I've got a problem with a piece of code. Basically, I use my listRegularFiles function in two separate places in my code. The first time I run itit appears to work perfectly well. If I use it a second time, however, it blows a gasket. I'll post my code below, and if anybody has any ideas,Here's the code for listRegularFiles:

Code:
string listRegularFiles(char* dirname)
{

[code]...

View 2 Replies View Related

Programming :: Attempting To Do A Strdup Is Failing With A Segmentation Fault Within Libc?

Mar 12, 2010

Does anyone see a problem with my code? attempting to do a strdup is failing with a segmentation fault within libcplugintools.h

Code:
/* Provide function for adding files to be copied/linked
into report

[code]...

View 1 Replies View Related

Ubuntu :: 10.10 32 Bit Initiate Start By Itself Even When The Power Is Off

Nov 2, 2010

Ubuntu 10.10 32 bit and Mint 10 Julia 64-bit initiate start by itself! When I shutdown computer and the power is off and the Internet cable is connected, it stops working, but after about 30 seconds system initiate start by itself, I mean the power is on. It doesn't happen when the Internet cable is off. Linux 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:45:36 UTC 2010 x86_64 GNU/Linux Motherboard Gigabyte 945P-DS3

View 2 Replies View Related

General :: How To Initiate/trigger A Key Stroke

Feb 12, 2010

to initiate/trigger a key stroke in Linux, as if the user has pressed those keys?

View 4 Replies View Related

Security :: Log The Names Of The Actual Processes That Initiate?

Jun 22, 2009

Is there an easy way to log the names of the actual processes that initiate, let's say, outbound connections from the Linux machine, for instance track what process initiates an outbound connection to MySQL port to remote machine and stuff like that?

View 3 Replies View Related

Ubuntu :: Manually Initiate RAID Consistency Check?

Apr 1, 2010

I have a mdadm RAID5 configuration on my Ubuntu Server (64-bit). In the first week after I configured the RAID, mdadm itself initiated a consistency check automatically. But after that, it won't check the RAID anymore. (the server isn't on 24/7, normally a few hours a day)I've read a post for manually initiating consistency check with these commands

Code:
sudo su -
echo check >> /sys/block/md0/sync_action

[code].....

View 3 Replies View Related

Ubuntu :: Apt-get Update Doesn't Work (Cannot Initiate The Connection To Connect )?

Jan 3, 2011

I am working on ubuntu (Xubuntos) using VMware virtual machine. when I enter apt-get update it gives following error;

Code:
xubuntos@xubuntos-tinyos:~$ sudo apt-get update
Code:
Err http://tinyos.stanford.edu edgy Release.gpg
Cannot initiate the connection to 3127:80 (0.0.12.55). - connect (22 Invalid argument)
Err http://tinyos.stanford.edu edgy/main Translation-en_US

[Code]...

View 2 Replies View Related

Ubuntu :: What's The Command To Initiate The Gnome System Tray For When It Fails To Load

May 14, 2010

what the command is for the System Tray, so thought I'd ask here. Note I am not asking how to put a system tray on the panel - I know I can add a notification area, but when I reboot there will be 2 of them, so this is not what I want.

I just need to be able to initialise it when it fails to load. Since my upgrade to Lucid, this has happened a couple of times, so expect it will happen again soon enough.

View 8 Replies View Related

Ubuntu Networking :: 'internal Fault. Hal Has Failed To Initiate' And The Wifi Connection Does Not Work

Jan 27, 2011

I have an Acer one with this peculiar operating system which I don't understand. I have had it a couple of years and it has hardly been used. It has always worked well and connected up to my WiFi until today when after it has booted I get 'internal fault. Hal has failed to initiate' and the Wifi connection does not work. I am perfectly familiar with Windows but I haven't a clue with this one. Have found a post on this forum relating to this fault but I am afraid it was double Dutch to me. I don't even know how to access it's inner system let along enter any commands.

View 4 Replies View Related

Ubuntu Networking :: [10.10] Wireless Becomes Inactive - Dell Inspiron 6400 / Failed To Initiate AP Scan?

Dec 18, 2010

I've got a wireless problem on my laptop (dell inspiron 6400).I don't know when exactly and why, but every time I watch a video on ..... or allostreaming, after a while (a few minutes), my wireless disconnect and it's impossible to get back any connexion. The only solution I have is to reboot my computer.

the command : iwconfig shows :
Code:
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11abg ESSID:"Callalc"
code....
Dec 18 18:33:18 yannick-laptop wpa_supplicant[1390]: Failed to initiate AP scan.

View 1 Replies View Related

Red Hat / Fedora :: Use Inittab At The Inittab To Initiate A Program At Startup?

Jul 5, 2010

1. I am using CentOS 5.4 and I try to use inittab at the etc/inittab to initiate a program at startup

2. Below is my script and saved as heritrix.sh

#!/bin/bash
export HERITRIX_HOME=/root/heritrix-1.14.3
cd $HERITRIX_HOME
chmod u+x $HERITRIX_HOME/bin/heritrix
$HERITRIX_HOME/bin/heritrix --admin=LOGIN:PASSWORD --port=9090

3. I did the chmod +x for the permission already.

4. I not confirmed whether it is running at startup.

5. the script is no problem as I have check it

View 2 Replies View Related

Debian Installation :: Apt-get Update Or Aptitude Update - Error "Cannot Initiate The Connection To Security.debian.org:80"

Jul 14, 2011

I have a very strange problem; when trying to apt-get update or aptitude update I get time out errors. At first it was resolving ipv6 adresses:

Cannot initiate the connection to ftp.litnet.lt:80 (2001:778::87). - connect (101: Network is unreachable) [IP: 2001:778::87 80] Err [URL] Cannot initiate the connection to security.debian.org:80 (2001:a78:5:1:216:35ff:fe7f:6ceb). - connect (101: Network is
unreachable) [IP: 2001:a78:5:1:216:35ff:fe7f:6ceb 80] As my host does not have normal ipv6 support, i just tried to disable ipv6: echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf

[Code]....

View 2 Replies View Related

Debian :: How Can I Tell Which Library Is Failing

Feb 11, 2011

I am trying to install a printer driver on an amd64 that was designed for 32bit only (of course)Squeeze automaticallty installed the ia32_libs package, but it may not be enough.How can I tell which library is failing?I do get an error on libcupsimage.so.2 but it does exist in /usr/lib/libcupsimage.so.2

View 4 Replies View Related

Fedora :: Ipv6 Failing / Why Is So?

Jan 20, 2010

I am new here and Fedora. Currently running Fedora 12 and recieved kernel crashes to which error report shows failure with IPv6.

I have disabled Ipv6 in /etc/sysconfig/network, blacklisted and stop these services.

However why is my Ipv6 failing?

View 2 Replies View Related

OpenSUSE :: KDE 4 Failing To Load?

Feb 9, 2011

After installing QtCurve 1.8-41 from software.opensuse (I've been playing around with themes), whenever I try to boot my computer, it gets to stage 1 of loading (the less colorful splash screen), and about halfway through loading that, the screen goes black and a box in the top left corner says: "Could not start kdeinit4. Check your installation". I'm then taken to failsafe, where I login. When I try to run kdeinit4 from the command line, I get this error:

kdeinit 4: symbol lookup error: /usr/lib/libQtSvg.so.4: undefined symbol: _ZN14QObjectPrivate15checkWindowRoleEv.

I've tried uninstalling through zypper, but it can never find the package I specify. I'm on 11.3.

View 9 Replies View Related

Ubuntu :: Log In Failing On Most Users

Aug 15, 2010

recently logging in become a bit unreliable - i thought i was mis-typing the passwords but on closer looking the passwords were ok (faulty passwords produces "authentication failure) Using the correct passwords the screen blanks for a second and then returns to the list of possible logins. I cannot log in except as one of the children - could this be because their logins have been used less often and less recently Everything was working well and I have not knowingly changed anything except the passwords after the problems started in order to solve what i thought was a simple mis-typing problem

I can log in as the children but their logins obviously do not have permission to do much
I also have a bootable puppy CD Unfortunately I am also a total noob but determined not to backslide into XP because up to now Ubuntu has been fantastic

View 9 Replies View Related

Ubuntu :: Install 64-bit - Keeps Failing ?

Feb 28, 2011

I am attempting to install Ubuntu 64-bit and it keeps failing. This is my first 64-bit system, and have not had problems with installing x86 Ubuntu in the past. When the full install failed, I tried installing it within Windows and that also failed. I've attached the log from that attempt in this post (had to trim it down to fit the file limit though). I don't know if these are the same errors I was getting on full install as I didn't write those errors down...I can try again and post them if needed though.

View 4 Replies View Related

Ubuntu :: ISO Burn Keeps Failing At 88%

Mar 22, 2011

So I downloaded 10.10 x86 ISO, MD5'd it and it all looks okay. I am using a decent LITEon DVD-RW drive (no errors before with ISOs) and using DeepBurner (also no errors before) and it keeps failing at 88% :

View 9 Replies View Related

Red Hat / Fedora :: Finch Failing On The 6?

Jan 12, 2010

I am trying to run finch on fedora6. Finch is exiting immediately on starting and i am not able to add any account using it. correct procedure to use finch.

View 5 Replies View Related

General :: DD To Backup Failing HDD?

Feb 1, 2010

HDA1 is going to die, SMART says its well beyond dead, and I can tell the read/write times have gone up drastically.

I know I can use dd to copy it from a live CD.

1.) If I dd it to something.img, is there a way for me to "work" on the backup copy? Basically, I need to backup ASAP, but won't have a replacement drive for a while, so I'll need to be able to put the changes into the backup.

2.) When it comes time to restore, if I dd it to a larger drive, is there a way to take advantage of all the extra space? I assume I can dd it over and the MBR & Partition Table will go with, so I can use something like gparted to grow the partition to the drive size?

Or is there a better way to make a backup?

View 4 Replies View Related

Networking :: VPN Failing On Ubuntu 10.04?

May 20, 2010

I have just upgraded to Ubuntu 10.04 and need to setup VPN connections to clients.

After configuring one of the vpn connections, I tried to connect but the connection fails with no specific errors.

Looking at the /var/log/messages file I get the entries as follows:
ay 20 13:52:28 machielr-laptop pppd[3362]: Plugin /usr/lib/pppd/2.4.5//nm-pptp-pppd-plugin.so loaded.
May 20 13:52:28 machielr-laptop pppd[3362]: pppd 2.4.5 started by root, uid 0
May 20 13:52:28 machielr-laptop pppd[3362]: Using interface ppp0

[Code]....

View 2 Replies View Related







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