Software :: Creating Threads Via A Cfg File?
Jan 11, 2010I'm trying to create n number of threads, but I would like to read a cfg file at run time, I've been experimenting with ifstream but Im not having any luck.
View 1 RepliesI'm trying to create n number of threads, but I would like to read a cfg file at run time, I've been experimenting with ifstream but Im not having any luck.
View 1 RepliesI have a multi-threaded application using pthreads. On application crash or when signalling with 'kill -s 6' the core file created by the 2.6.18-128 kernel on CentOS 5.3 shows only one single thread. Core file saved with gcore in gdb shows all running threads properly so the problem is clearly in the kernel. I tested CentOS 5.2 (kernel 2.6.28-92) and it works correctly.
what's wrong with CentOS 5.3 kernels?
I downloaded three iso-images, 1 dvd-image and 2 cd-images:
openSUSE-11.3-DVD-i586.iso
openSUSE-11.3-GNOME-LiveCD-i686.iso
openSUSE-11.3-KDE4-LiveCD-i686.iso
Being paranoid, I created iso-files from the burnt DVD-R and the two burnt CD-R to verify integrity.
The iso-file of the DVD-R was identical to the downloaded image. Both iso-files created from the CD-R were different in size.
The original size of openSUSE-11.3-KDE4-LiveCD-i686.iso is 719.323.136 Bytes.
I only got 718.938.112 Bytes when recreating an ISO-file from my CD-R.
The CD-R is from Sony. When the length of my ISO-file doesn't correspond to the downloaded one, the checksum file verification doesn't work.
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]....
I bought a new SD card which I intend to put some MP3s on - except that I can't write to it because it tells me the destination is Read Only. No-probs thinks I: I'll just reformat it.
"Error creating file system: helper exited with exit code 1: cannot open /dev/mmcblk0p1: Read-only file system"
Various chmod commands all result in Read-only file system. I tried umount then mount commands, but it couldn't find it to mount once I'd unmounted it using the same /media/ file path (I assume it's the only one).
I can't locate any PHP 5.3 rpms but before I compile it from source, is there a way to create my installation option and save it into a RPM? I have a handful of servers I would like to install PHP on, but it would be so much easier if I could just do an "rpm -ivh"
I google and found instructions on how to build from tar.gz files but what about the options I set on the CLI?
I have Debian / Ubuntu / Xubuntu. I'm trying to distribute and run a Python file with the least number of clicks for the end user. How do I create a PKG file for Mac OS X on Linux?
View 1 Replies View RelatedI would like to add some restrictions to my postfix configuration such as this:
"smtpd_sender_restriction = check_sender_access maptype:mapname"
give me detailed instruction on how to create this maptype:mapname file...
make it a detailed one since I am still a novice with linux.
I have create a perl script, which create a text file, and it works well. But i want this to create in a specified directory.
THe scrip is:
Code:
#!/usr/bin/perl
use POSIX;
#Directory where the text file will be created.
$directory = '/space/data';
[Code]....
create a Cron file and script. I've tried reading through my Linux book but I am just lost here. I need to create a Cron file that will perform a Level 0 backup once per month, a Level 2 dump one day per week, and a Level 5 dump every day that neither a level 0 nor a level 2 dump is performed.
View 5 Replies View RelatedI'm a bit of a newbie with regards to Linux so please bear with me. Basically I've got a problem with frequent hard drive unloads (first diagnosed by hard disk clicking whilst idle)So I need to adjust my advanced power management settings using hdparm to fix the issue. Indeed, following the instructions I temporarily fixed the problem by issuing the command.Again should i create a blank text file using gnomesu gedit and name it disk in the above folder (and then copying the stuff given in the link)?
View 2 Replies View RelatedI'm running karmic koala 9.10I installed cups-pdf and it now shows as the default in my printer list, but when I choose the file type drop down from the printer dialog box it only has ps as an option so when I save it I end up with a post script file not a pdf.
View 3 Replies View RelatedCode:
#!/bin/sh
DATE=$(date +%m/%d/%y)
tar zvcf /home/mark/Minecraft/worldbackups/world.$DATE.tgz /home/mark/Minecraft/Public
This give the output of
Code:
mark@kalle-desktop:~/Minecraft/Exec$ sh save.sh
tar: Removing leading '/' from member names
/home/mark/Minecraft/Public/
/home/mark/Minecraft/Public/default.html
/home/mark/Minecraft/Public/world.png
tar: /home/mark/Minecraft/worldbackups/world.01/17/11.tgz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
i'm using ubuntu10.10 maverick.im programming in systemc..i dunno how to compile and run my program (*.cpp). where should i save my program and where to create makefile???what is this makefile and how should i create it..got completely no idea and i'm new to ubuntu..so please someone explain clearly the concept.
View 1 Replies View RelatedI need to create a folder for every single file in a directory, possibly making the folder have the same name as the file that it will be containing. Is it possible to do via terminal?
View 9 Replies View RelatedMy storage needs are beginning to grow dramatically, and I was wondering how I could set up a raid. I'm currently planning on building a file server that is a RAID 5 server, so as to have some amount of redundancy.
I've got multiple questions regarding building this server.Do I need five drives to begin with, or can I just convert everything to RAID 5, once I hit 3 drives without losing all my data. Will I be able to add more drives to my RAID 5 setup without losing all the data already on the drives. Do all the drives need to have the same RPM? Regarding the hot-swappable drives thing. Does this mean that I can use slots like I would an external hard drive? Plus in a drive, and it recognizes it on my machine? Has anyone ever used FreeNAS to build a fileserver of this sort? Can you tell me how difficult you found FreeNAS to configure? I plan to move over to CoreNAS when it comes out. Will I need to reformat all my drives if I do? I plan to use a hardware RAID controller with this.
I am trying to create a bootable DVD disk of Fedora. I am having trouble in doing this. I want to format the Hard drive and create a new file system. I have downloaded the source cds for fedora12 AND fedorai386 downloads. I have been trying to create a DVD burn with the Fedora12.iso extracted and then burned to DVD. This does not work. I just want to be able to pop the DVD in and then start the install, and on any machine.
View 3 Replies View RelatedOriginally Posted by Gekitsuu you should be able to do NEWSTRING=$STRING1$STRING2 it works but i can't use it for creating a path variable / file name.
e.g.
$STRING1 = path
$STRING2 = filename
cat $STRING1$STRING2 will not work.
so how to get this working?
How to create a dump of an existing file and how to restore it with command line?
View 6 Replies View RelatedIn order to change host name I usually create a file with this:
nano /etc/hostname (after going SU)
And in that I type the new hostname.
Also I did this too...
nano /etc/hosts
127.0.0.1 localhost <hostname>
nothing happens. OS is PCLinux
I am calling a service using http post through wget, the command is successfully executing but for each execution its creating a file and saving variable names n data n it. I want to execute this command without creation of a file. Would anyone suggest me what needs to be done in this regard.
My command:
wget --post-data 'var1=99&var2=200' http://xyz.example.com:5555/invoke/Samples:httpInvoke
For every execution, its creating the files with names:
Samples:httpInvoke1
Samples:httpInvoke2
Samples:httpInvoke3
[Code]...
I would like to do something that should be fairly simple but can not find a way for it.
I want to make a page in postscript or pdf format containing four lines of text and two png images.
Would you know an easy way to concatenate my text file with the two images in a ps or pdf file?
I need a solution that works via command line only as this is for a script.
I use redhat 5 for this and would prefer not having to install any extra software.
I have downloaded Fedora-12-x86_64-DVD.iso. Now I want to create a bootable USB from the downloaded ISO file. I tried with the latest version of liveusb-creator 3.9.1. I am unable to do so. It took around 3 days to download the iso file and now I cant even use it.
ERROR MESSAGE::
Fedora-12-x86_64-DVD.iso selected
Verifying filesystem...
Extracting live image to USB device...
Wrote to device at 1 MB/sec
Creating 100MB persistent overlay
LiveUSB creation failed!
Here is the screen shot....
I want to create a compressed ISO image file and mount that file to one of the virtual drives and access the content (read-only) without worrying about manual decompression/extraction.For Windows and Linux (Ubuntu) OSes.
View 1 Replies View RelatedWhy is pppoeconf not creating dsl-provider file in /etc/ppp/peers/ directory.I just re-installed Lucid and now facing above prob. I cannot even copy an dummy file to the above path (even using sudo)It does not give any error,but then file is also not copied. I observed after re-installing,old kernels are also visble and i can login in low graphics mode I expected that after fesh install,there would be only kernel..default one..
View 2 Replies View RelatedI have a Java program (minecraft server) that needs to be run from the command line. The code is:
Code:
java -Xmx512M -Xms512M -jar minecraft_server.jar nogui
To make life easy (i've got the java file in a folder on the desktop) I want to have a shortcut (or similar) sitting on the desktop. I've tried
Code:
ln 'java -Xmx512M -Xms512M -jar minecraft_server.jar nogui' ./../minesraftserver
with single and double quotes but my unix command line skills are pretty basic and this is obviously incorrect.
I would like to use an unused desktop running Ubuntu desktop edition as sort of a file server for my house. I don't need to do much other than use it as a networked drive. All of the computers in the house are running either Windows or linux (and a google tv if possible). What programs do I need to use it for this purpose? I've heard something about apache and samba. What else do I need?
View 6 Replies View RelatedHaving spent weeks perfecting my Ubuntu the way I like it, I was wondering if there is a way of preserving it as a either a liveCD or USB flash drive, with a view of using it on other PC's activated upon start up?
Possibly (under the USB option) with the option of launching from the flash drive itself, or installing onto a PC's hard drive.So, in essence, it would be a liveCD but custom made to reflect the way my Ubuntu looks and feels now? Is there any easy-to-use software available to perform such a task?
I tried to run this: ls * -lag > test1.txt
And it gives me a 'Permission denied' for text1.txt (a new file to be created.)
Now I have admin privileges (in fact I'm the only one set up on it) and I can't figure out why I'm getting this 'Permission denied'. Do I have to create the file first and chmod so I can read/write/delete the file?
I saw an article use the following cat command to create a new text file:$ cat > first.sh << ENDAnd then after press the 'return' buttion, a '>' sign appeared expecting you to input the content. If I type 'END' then the 'return' button, then a new text file is created with what I just typed...I'd like to know what's the differnece in just type:$ cat > first.shwithout the '<<' sign?What '<<' really means? I cannot find it's meaning anywere... seems it's not in the redirection section.
View 6 Replies View Related