Programming :: If Modify Tcp.c Stack File And How To Compile

Nov 4, 2010

i have just modify tcp.c file in/usr/src/linux/net/ ipv4 location.Now should i compile the complete kernel?if not then how to compile that net/ipv4 package or etc.

View 1 Replies


ADVERTISEMENT

Programming :: Run Script To Modify Text File?

Mar 20, 2010

I have around 600 empty text files that I need to add the name of this file as part of the data, I mean files from "file1.txt to "file599.txt, all of them empty, and I need to get the name inside the file, so, when I open the file show the name as part of the data "file1".

View 11 Replies View Related

Programming :: Parse And Modify File Without Creating A Copy?

Nov 4, 2010

I don't think this is a "perl one-liner" of find and replace. I'm trying to auto-fill some information in a listing of files. The simplest example is that in the files the following exists:

I would want the script to find this and populate it with something like -- Date : 20101004-1758

I have a few more similar fields to autofill, and I'd like to do this from within a larger perl script I'm developing to process these files. So, how I perform in-place file modification from within a perl script?

View 3 Replies View Related

Programming :: Store Data In Text File And Be Able To Modify It And Save As Well Using C++?

Jan 25, 2010

I wanna learn how to store data in text file and be able to modify it and save as well using C++.

Note: im using Turbo C++ 3.0

View 9 Replies View Related

Programming :: BASH: Read + Define + Modify A Numeric Value From/to A File?

Mar 25, 2010

I want my bash file to read from "input.dat" the two values emin emax. My input file looks like that:

#cat input.dat
!Energies
emin 10.00 !minimum energy
emax 30.00 !maximum energy

Now this seems to be not so hard with the command awk

#!/bin/bash
awk '{FS=" "}/emin/{print $2}' input.dat
awk '{FS=" "}/emax/{print $2}' input.dat

[code]....

So far so good. Now, I want to define two variables (e.g. e1,e2) in the bash file, so that their values would correspond to 00.00 and 30.00, as read from the input file. This one I have not found yet, thus asking for your advice. At the end, writing echo $e1 $e2, I should get 10.00 30.00 This is even harder to me: I want to replace the values emin,emax in a new file "modify.dat" which looks like that:

...
c---- energy interval
emin = 1.00
emax = 2.00
...

with the values e1 and e2 I have in my bash file. In other words, I want to call "modify.dat", find these two lines and replace the numeric values with the e1 and e2. At the end, my file should be like:

...
c---- energy interval
emin = 10.00
emax = 30.00
...

View 3 Replies View Related

Ubuntu :: How To Modify Kernel And Compile It

Aug 16, 2011

I am new to Linux Kernel. I want to disable branch prediction in kernel and recompile for my research purpose. Can anyone point me to clear instructions on where i can find the kernel config file in ubuntu and steps to recompile the updated kernel

View 1 Replies View Related

Ubuntu :: Compile Application From Source In Order To Modify?

Sep 1, 2011

I have the source of the application I want to modify, as well as the list of dependencies I need in order to compile. I got the source code for those and compiled/installed them. I'm fairly sure that all of the dependencies are installed. However, when I go to run the compiler it crashes while parsing some of the code.

I had the application installed before, and it ran. After tinkering around trying to get the source to compile, the app no longer runs either. It crashes, and if run from the CLI, spits out something about not finding one of the files from the SDL library.

So obviously I did something wrong to mess everything up, because I'm in a deeper hole than when I started. Anyone know how I would go about fixing this? Or even starting with a clean slate so that I can have another go at it?

View 3 Replies View Related

Programming :: Can't Compile C++ - Execvp: No Such File Or Directory

Mar 2, 2011

i was trying to Compile my c++ program..cme across this problem....but my c programs are getting compilied without any problem.I am using fedora 14. Below is the way terminal reacted to my program..

gcc prog1.cpp gcc: error trying to exec 'cc1plus': execvp: No such file or directory

View 4 Replies View Related

Programming :: DataBase In Python - Compile .py Files Into A .exe File

Jun 20, 2011

i am new to python programing and i have a couple of ?'s

1- what would i do if i needed to find the closest, bigger number, from a list of numbers when the user types a number in.

2- (windows) i need a program that can compile .py files into a .exe file so that it works on a machine without python it also needs to work with python 3.2.

View 8 Replies View Related

Programming :: Setup A Stack (1kB) For My Module In C?

Sep 6, 2010

I need to call some other functions in "int init_module(void)" and module. So I need a stack. How can I setup a stack (1kB) for my module in C?

View 11 Replies View Related

Programming :: Thread Stack Using Pthread_attr_setstackaddr()?

Sep 22, 2010

When I set the stack base address of the child thread using the POSIX library function "pthread_attr_setstackaddr()", I am unable to access the memory contents of its parent. The data-structures that are created on the HEAP of its parent using malloc() are either getting destroyed or unaccessible when moving to the context of the child thread. These data-structures are being passed as an argument to the child thread.Even if I make these variables global then also it is not working.pthread_attr_setstacksize(tattr, ...);stackbase = (void *) malloc(...);pthread_attr_setstackaddr(tattr, stackbase);But when I create the child thread without setting its stack base address using that pthread_attr_setstackaddr(), then it is able to access the parent's memory contents.

View 1 Replies View Related

Programming :: View Stack Of Process?

Mar 1, 2011

If I issue the following and the process doesn't quit, is there a way to view what it's doing with the SIGTERM signal on the stack? Is this done via the pstack command?kill -s SIGTERM <PID>

View 4 Replies View Related

Programming :: Why The Stack Size Limit

May 1, 2011

Why is it in Linux that there is a stack size set by default? And why is it so small? (My system is set to 8192 kbytes.) And why is there a default limit on the stack size when the max memory and virtual memory size are, by default, unlimited? (Aren't they both fed from the same place ultimately?)

Reason I ask: I want to use recursive functions in my programming a lot more. Problem is, if the language (or implementation) doesn't happen to support tail-call recursion, then I can be pretty well certain that the first huge problem that gets thrown at my function is going to kill my program because the stack size limit is going to be quickly reached. Obviously, I can change the stack size limit for my own computers, but it doesn't feel so great knowing that most of the people who copy and execute my code will have probably have overlooked this. Anyway, does anyone know: is this small default stack size limit just one of those historical artifacts, or is there some technical reason for it?

View 5 Replies View Related

Programming :: Increasing Thread Stack Size?

Jan 23, 2011

I seem to only be able to set my stack size on my linux server to 15000. If I increase it to 20000 I get a Segmentation Fault. how I can get the linux OS to increase the stack size? Code: threadRet |= pthread_attr_setstacksize( &m_ThreadAttributes, 15000 );

View 8 Replies View Related

Programming :: Format Of Realmode Interrupt Return On Stack?

Apr 10, 2010

What is the realmode interrupt return on the stack. Is it pop AX pop CS or vice versa?

View 4 Replies View Related

Programming :: Why The Thread Stack Size Cannot Be Changed When Calling In A Dynamic Library

Jan 5, 2011

Why the thread stack size can not be changed after calling pthread_attr_setstacksize & pthread_create in a dynamic library? Detail: I write a file thread_factory.c and plan to build it and produce a dynamic library (libthread_factory.so) In the thread_factory.c , there is a routine

[Code]....

And after this, there is application, it will call fct_thread_create(STACK_SIZE_256KB), and then call pthread_attr_getstacksize(), but the stack size return always be a fixed value 0xa01000. (I tried this on Fedora12) But if I build the application source code with the file thread_factory.c directly, the stack size return is right as my expect. I checked the source code of glibc about the routine pthread_create() as below:

[Code]....

View 7 Replies View Related

Fedora :: Mupen64 Tried To Make Stack File Executable?

Apr 4, 2011

I tried to run Mupen64 on Fedora 14 and SELinux gave me a message (see title of thread). It sounded like a serious problem. Do I have a corrupted version, is it nothing to worry about?

View 1 Replies View Related

Programming :: Rules To Set The Pthread Stack Size - Compute The Memory Needed By Each Thread?

Jul 26, 2010

i have an application that launches several pthreads, i know that the default size used by Linux is 8Mb for each pthread. However i would like to optimize the total memory usage by my application by decreasing the default stack size of each pthread to the needed resources. My questions:

- Are there any rules to set the pthread stack size.
- How to compute the memory needed by each thread.
- Is the malloc call inside a thread counted from the stack size of the same pthread?

View 2 Replies View Related

OpenSUSE Network :: Add Few Lines To Php.ini File And Modify Suhosin File?

Dec 29, 2009

Is installing "php5-suhosin" from yast and restarting apache enough to make suhosin work out of the box? Or do I need to add few lines to php.ini file and modify suhosin file?

View 3 Replies View Related

Programming :: How To Modify System Kernel

Dec 7, 2010

For my work, I have to modify the routing lookup process at Linux kernel.

The details is below:

A-----B.

We have pcA, pcB (using Linux OS kernel 2.6.26.5) connect together. We need to modify the source code of kernel at B in order to if A sends the packets with destination IP address as C, pcB still receives this packet and send to transport layer (that means, it bypass the routing lookup process at kernel).

The solution I used as the following code...

View 12 Replies View Related

Programming :: Modify What Already Printed On The Screen?

May 6, 2011

Now we are implementing our own shell using C++. What upseting us is the history command function, we use an array to store the history commands, and print the when receiving the up and down arrow buttons. The problem is we cannot modify the history command already printed on the terminal, we even cannot move the cursur, let alone modifying the command.

View 1 Replies View Related

Programming :: How To Modify ArrayList From Outside Of Class?

Mar 10, 2010

Okay so I'm working on a program here as I'm learning java,I have an array that is initialized with 5 objects that are hard coded. I have made a GUI that takes the input needed and creates an object with those values.I need to add that object to the ArrayList that I have previously made.Okay, so I have three classes, guiclass.java, main.java and gladiator.java Objects are made and defined in "gladiator".Main contains my public static void main section, launches my gui, creates my five hard coded objects, creates my ArrayList and adds my five hard coded objects to the ArrayList.Now, I need to add the object that I generated in the guiSection [action Listener]to the ArrayList that I created in my main class's public static void main string... section. Problem is my arraylist "cannot be resolved" from guiclass.

View 13 Replies View Related

Programming :: Modify Lines That Are Too Long?

May 25, 2010

I have a CDL netlist with 5630 lines. 512 of the lines are over 128 characters. The tool I am using to read in the CDL returns an error for each line over 128 characters.

If the line is too long I can fix it by adding a line continuation symbol, in this case a "/", somewhere prior to the 128th character then a line feed, obviously, and a "+" to the continuation.

example (pretend its a long line);
before;
this line is too long
after;
this line /
+ is too long

Part of the problem is that I can't use a constant point prior to the 128th character because I can't break up a term.

bad;
this line i /
+ s too long

If I can replace the last space before the 128th character with " / + " on all lines that are over 128 characters then I'm golden. I'm not sure if I need to escape the + or not. If so then the substitution is " / + ". And if I use sed then I'll escape the .

View 6 Replies View Related

Programming :: Trying To Modify Code For GBLink?

Apr 12, 2010

I'm trying to modify the code for gblink so that it can read from my usb to parallel port cable. I know that the address for a normal parallel port (/dev/lp0) is 0x3bc, but how can I find out the address for /dev/usb/lp0?

View 6 Replies View Related

Programming :: Using Sed To Modify Command Output?

Jun 13, 2010

The output of a command changed and I need to extract the data and print it out in a different fassion:

Code:
abcd1=aaaa xx
abcd 2 aaa xx bbb
abcd2=aaaa xy
ab 2 xx aaa bbb ccc xxx
should be transformed to:

[Code]...

Currently I used sed "search1|search2|search3" to get the lines that need to be transformed. But I also need to search for substrings in those lines and I need to print those substrings in a specific order together with other characters. How is this done with sed?

View 7 Replies View Related

Programming :: Modify Output Of Shell Script

Dec 3, 2010

I'm running RHEL5.5 and nagios 3.2.0. The real question deals with how to change the printed output so nagios will work with it.I have made a script that will calculate network throughput on interfaces. The script is going through and finding all interfaces (eth, bond, lan) and doing the math to calculate throughput.The output is mainly for nagios to report and trend the values. As nagios wants to see nothing but perf data after the '|' character, I somehow need to have only one '|' character for all of the output.

View 2 Replies View Related

General :: Modify A File That Contains \ Using Sed Or Awk ?

May 13, 2010

I need to modify a file that contains \tsus.fbfs.comappsdataStormLossProduction and replace the \tsus.fbfs.comappsdataStormLossProduction line with rm -f /mnt/nfsvol/PC/SLR/

I have tried:

But it provides an error on the second . I need to change this in place and not redirect to another file.

Is this possible? I have used sed and awk before but not extensively.

View 7 Replies View Related

Programming :: How To Parse And Modify Keywords Using Shell Script?

Apr 14, 2011

There is a file with that format of each models' information.I don't think that's good format, but I cannot change that format. I needed to modify the model name, 'model = xxx' as 'model = abc'.And I don't know how to parse and modify 'model = iii' and 'model = ddd'.The only clue to parse 'model = ddd' is the second 'model = ' after the second 'system information'. But how to parse the second keyword?Is it possible with 'sed'?I sometimes have to modify the information of the file.using shell script if possible.Python is ok. (Shell script is better for me.)

View 15 Replies View Related

Debian :: Modify The File Grub.cfg?,

Mar 24, 2011

how modify the file grub.cfg?, is for 6.0, the grub2.

View 14 Replies View Related

CentOS 5 Server :: How To Modify PAM File

Jan 15, 2010

Whenever I modify my pam file as shown below I can no longer log into my centos; I have to go into single user mode and undo the changes. What I want to do is log all failed authentication attempts but I don't want it to affect the root user account.

# vi /etc/pam.d/system-auth
auth required pam_tally.so no_magic_root
account required pam_tally.so deny=3 no_magic_root lock_time=180

View 1 Replies View Related







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