Hi,
For the purposes of prototyping a new set of shared libraries in a development sandbox (to which I don't have root access), I'd like to know how to execute a binary while completely overriding the contents of /etc/ld.so.cache, so that none of the system libraries get loaded.
How can this be done? I have looked at mechanisms like se...
I've been using VIM for a few weeks now while messing with various web languages and I'm really enjoying it.
I find it cumbersome having to tab or click into my browser and refresh the page to see the effect of a code change. It's even more annoying as I'm using Virtual Box and I tend to be working from PDF files on the host system so I...
Given: multithreaded (~20 threads) C++ application under RHEL 5.3.
When testing under load, top shows that CPU usage jumps in range 10-40% every second.
The design mostly pretty simple - most of the threads implement active object design pattern: thread has a thread-safe queue, requests from other queues are pushed to the queue, while t...
Hi SOF,
I have this program which uses Boost::Asio for sockets. I pretty much altered some code from the Boost examples. The program compiles and runs just like it should on Windows in VS. However, when I compile the program on Linux and run it, I get a Segmentation fault.
I posted the code here
The command I use to compile it is this...
I'm a pretty Huge n00b when it comes to Linux
exec ('whoami', $output, $return);
echo $return;
// Outputs 127
Which means the command is not executing. I can get it to execute when I root into the server.
Any help would be greatly appreciated!
...
I am following this tutorial that is like the hello world for post-commit
I am using unbuntu 10.04. I installed svnnotify and ran $ which svnnotify which output:
/usr/bin/svnnotify
so I changed the path in the turorial from /usr/local/bin/svnnotify to /usr/bin/svnnotify
I also tried changing the line: #!/bin/sh to #!/bin/bash si...
Hi,
I have a server running Redhat EL 4.x.
I have some changes to do in the source files of libc.
And now I need to build the library "libc.so.6.." and install the same.
My application finally depends on /lib/tls/libc.so.6
So, please let me know the process to build and install the "libc".
Thanks for your time and help.
...
I want to split a 400k line long log file from a particular line number.
For this question, lets make this an arbitrary number 300k.
Is there a linux function that allows me to do this?
I know split lets me split the file in equal parts either by size or line numbers but that's not what I want. I want to the first 300k in one file and...
How do I change the library a function loads from during run time?
For example, say I want to replace the standard printf function with something new, I can write my own version and compile it into a shared library, then put "LD_PRELOAD=/my/library.so" in the environment before running my executable.
But let's say that instead, I want ...
Hi,
I am using C language and Linux as my programming platform.
I am learning how to create a daemon, and I want to create a log file so that I write a debug message in my daemon. My question is where should I put the log file in my system. Should I put it in the var folder?
Please advice.
Many thanks.
...
I have a classifieds website, and on each classified there is a tip-form where users may tip a friend about the classified.
The tip-forms' action is set to a php-page, which mails the email after sanitizing etc...
I have to filter away spam etc so that my email-server don't get blacklisted or anything...
I have my own server (VPS, Linu...
I wrote the following script which enables timeout of 20 seconds if grep can not find the relevant string in the file.
The script works well, but the output from the script is like this:
./test: line 11: 30039: Killed
how to disable this message from the kill command?
how to tell kill command to ignore if process not exist?
THX
Ya...
I have a kernel patch for a slightly different kernel version then the one I'm trying to patch. Needless to say, the patch partially fails. I can certainly fix it manually, but I was wondering maybe there is a graphical patch utility that can be used to resolve the conflicts.
...
I need explain about the four field (4 or 0 ) of ps -ef command , what the meaning of this number
THX yael
root 27116 27112 4 15:25 pts/0 00:00:00 grep -qsRw -m1 monitohhhhhhhr /var
root 29017 27113 0 15:25 pts/0 00:00:00 grep qsRw -m1
...
I have an uploader in my web page, but some people upload files named like "compañia 15% *09.jpg" and i have problems when the filenames are like that one.
I would like to found a class that returns for that example something like this: "compania1509.jpg".
...
Hi,
I have to deploy a Django project on Red hat enterprise linux 5, the project has been developed on Python 2.5 but the server environment has Python 2.4 which is causing some issues. I googled a lot over internet to get the Python 2.5 built rpm for the server but there are only src rpm available for the mentioned Linux version.
I h...
If I use send() on a non-blocking tcp socket in Linux will it return EAGAIN for anything other than a send buffer full condition?
I basically need to decide if I want to use the socket send buffer as the only buffer for my app or if I need my own user space buffer to feed the socket buffer.
...
The situation I'm in is this - there's a process that's writing to a file, sometimes the file is rather large say 400 - 500MB. I need to know when it's done writing. How can I determine this? If I look in the directory I'll see it there but it might not be done being written. Plus this needs to be done remotely - as in on the same int...
Hi,
I can see the background process using ps. But Is there a way to view the foreground process?. For example,
$nohup process1 &
then
ps -ef | grep "process1"
would display the process "process1" in execution.
But the above command wouldn't show a foreground process executed like,
$process2
Thanks in Advance.
...
Hi,
How can I retrieve uptime under linux using C? (without using popen and/or /proc)
Thanks
...