Hi, I have just bought a VPS running Ubuntu and I need to install the LAMP stack with PHP 5.1.6. The VPS came with no PHP installed (checked this from the shell with php -v) and with Apache/2.2.12 installed. I installed PHP 5.1.6 from source and compiled it with Apache 2.2 (using libapache2-mod-php5), tried a phpinfo() test which worked ...
Hi,
Assume I have an executable called 'exe' which spawns a child process. This child process needs to become a daemon and we need to change its name. Next I want to use killall to send a signal to this process using the new name, but I need to use the old name.
The order of events is as follows:
start 'exec'
fork -> exit if parent
d...
Hello, I wanna get a complete C++ IDE for linux, specifically ubuntu 7.1, but I want a kind of link where I could download all the files and packets at once, because I have to install it on a remote pc that is far from one Internet connection. I don't need and strong IDE because it is for teach basics of C++. Could you please help me???
...
Can you recommend a good debugging malloc library for linux? I know there are a lot of options out there, I just need to know which libraries people are actually using to solve real-life problems.
Thanks!
EDIT: I know about Valgrind, but sometimes the performance is really too low.
...
In Linux I would like to run a program but only for a limited time, like 1 second. If the program exceeds this running time I would like to kill the process and show an error message.
...
I have a java process that runs as a service via a shell script on a RHEL box. The process runs for a while, then seems to die quietly. The process does have a shutdown hook that fires and in the event of a normal kill it does log stuff and but nothing is logged in the cases where it dies.
I checked the system logs and at the same tim...
Hello,
I'm trying to get cron to call in the correct path's. When I run a Python script from shell the script run's fine as it uses the path's set in bashrc but when I use cron all the path's are not used from bashrc. Is there a file I can enter the path's into for cron like bashrc or a way to call the path's from bashrc.
Sorry I don'...
Hi,
SWFUpload doesn't work on ubuntu, I can see various mentions of it throughout the internets but I'm wondering if anyone here as found any work arounds?
I'm developing on Windows, so the code executes fine. But my colleague is running ubuntu, and SWFUpload crashes instantly. Has anyone encountered that and found a work around? I've...
Hi All,
Is there a standard Linux command i can use to read a file chunk by chunk?
For example, i have a file whose size is 6kB. I want to read/print the first 1kB, and then the 2nd 1kB ...
Seems cat/head/tail wont work in this case.
Thanks very much.
...
I want my program always know all of the mountpoints. After a quick google I found that getmntent() and friends can tell me what is mounted. I realize I could do this everytime that I needed to know what was mounted, but is there some way to recognise when something gets mounted/unmounted so I don't have to keep reading the file? Is t...
I'm using JNA to manipulate application windows on Linux by sending Xlib messages but can't seem to move a window.
My original implementation executed wmctrl on the shell to move the windows and that successfully moved the windows. Unfortunately, there's a noticeable amount of overhead associated with calling shell programs from Java, s...
my Socket.cpp containing
// Implementation of the Socket class.
#include "Socket.h"
#include "string.h"
#include <string.h>
#include <errno.h>
#include <fcntl.h>
Socket::Socket() :
m_sock ( -1 )
{
memset ( &m_addr,
0,
sizeof ( m_addr ) );
}
Socket::~Socket()
{
if ( is_valid() )
::close ( m_sock );
}
bool Socke...
#include "ServerSocket.h"
#include "SocketException.h"
#include <string>
#include<iostream>
int main(int argc, int argv[])
{
std::cout << "running....\n";
try
{
// Create the socket
ServerSocket server ( 30000 );
while ( true )
{
ServerSocket new_sock;
server.accept ( new_sock );
...
I am developing an app on python which will check for user inactivity. Is there a way to check for key press and mouse move events in linux?
...
I'm running Ubuntu to compile a set of code which requires python 2.4.
How can I setup a terminal launcher so that when I open that launcher all python related commands will use python 2.4 instead of the python 2.6 that is defaulted in Ubuntu?
...
My VPS account has been occasionally running out of memory. It's using Apache on Linux. Support says it's a slow memory leak and has enabled MaxRequestsPerChild to deal with it.
I have a few questions about this. When a child process dies, will it cause my scripts to lose session data? Does anyone have advice on how I can track down thi...
I've read about fork and from what I understand, the process is cloned but which process? The script itself or the process that launched the script?
For example:
I'm running rTorrent on my machine and when a torrent completes, I have a script run against it. This script fetches data from the web so it takes a few seconds to complete. D...
Is there any way to add a system call dynamic, such as through a module? I have found places where I can override an existing system call with a module by just changing the sys_call_table[] array to get my overridden function instead of the native when my module is installed, but can you do this with a new system call and a module?
...
How would I do something like:
ceiling(N/500)
N representing a number.
But in a linux bash script
...
How would I round the result from two divided numbers, e.g.
3/2
As when I do
testOne=$((3/2))
$testOne contains "1" when it should have rounded up to "2" as the answer from 3/2=1.5
...