I am working on a threaded application on Linux in C++ which attempts to be real time, doing an action on a heartbeat, or as close to it as possible.
In practice, I find the OS is swapping out my thread and causing delays of up to a tenth of a second while it is switched out, causing the heartbeat to be irregular.
Is there a way my thr...
My program is written in C++. compiled with gcc, using -g3 -O0 -ggdb flags. When it crashes, I want to open its core dump. Does it create core dump file, or I need to do something to enable core dump creation, in the program itself, or on computer where it is executed? Where this file is created, and what is its name?
...
I am trying to isolate a nasty bug, which brings down my linux kernel. I am printing messages to stderr and stderr is redirected to a log file. Is there a way to disable buffering on the file access? When kernel hangs, I am losing the messages in the buffer.
...
Could anyone recommend FTP / SFTP client C/C++ library for Linux-based embedded system? I know about Curl library but I need something as simple as possible just to download files from FTP / SFTP servers. Is there any recommendation to look for? Yes, SFTP support is critical. Actually I can even sacrifice multi-threading because I need o...
Is it possible to clear a file preserving its timestamp, using standard Linux commands? For example:
echo "" > file-name
converts the text file to empty, this is OK for me. But I need to keep the timestamp unchanged.
...
#include <iostream>
#include <signal.h>
#include <fenv.h>
#include <string.h>
void signal_handler(int sig, siginfo_t *siginfo, void* context)
{
std::cout << " signal_handler " << fetestexcept(FE_ALL_EXCEPT) << std::endl;
throw "exception";
}
void divide() {
float a = 1000., b = 0., c, f = 1e-300;
c = a / b;
std::cout << ...
Hello there,
I've been trying to install lpng142 on my fed 12 system. Seems like a problem to me. I get this error
[root@localhost lpng142]# ./configure
bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory
[root@localhost lpng142]#
How do I fix this? and for more details, I shall include the /etc/fstub file deta...
I have a series of python scripts with execute permissions in Linux. They are stored in SVN.
If I then run svn up to update them, the overwritten files are back to 644 - ie no execute permissions for anyone.
Yes I could just script it to chmod +x * afterwards, but surely there's a way to store permissions in SVN or to maintain them wh...
Basically, I want a simple pushButton with a colorful text which when pressed exits the application.
Why cant I press PushButton in this simple program. I am using QT 4.6 on Arch x86_64.
#include <QtGui/QApplication>
#include <QLabel>
#include <QPushButton>
#include<QtGui>
int main(int argc, char *argv[])
{
QApplication a(argc, a...
When commiting changes to already existing files I receive the following error messages since today, although no one did change anything I know of at the server or client side.
The server is running SUSE Linux Enterprise Server 10 (i586). We're using use mod_dav_svn 1.6.4 in apache 2.2.13. The svn server is running behind a reverse-prox...
Hello
I want to run a java program on a linux server in profiling mode.
Is there any profiling tool that can profile a java program on a linux server in command prompt?
Thanks in advance.
...
I need a bash (or a plain shell) script to put in a cron job that every minute checks if the internet is up.
This is how I did it:
#! /bin/sh
host1=google.com
host2=wikipedia.org
curr_date=`date +"%Y%m%d%H%M"`
echo -n "${curr_date};"
((ping -w5 -c3 $host1 || ping -w5 -c3 $host2) > /dev/null 2>&1) && echo "up" || (echo "down" && exit ...
I created an ubuntu chroot environment (using debootstrap) and started openoffice as a service to convert files using unoconv. It works but it spends about 20s to do conversions which are below 1s outside chroot jail. Stracing it I can see that this extra time is spent in some socket operations whose timeout expires, the same operations ...
hello guys.. ive got an error to fix. its:
[FreeTDS][SQL Server]Error converting characters into server's character set. Some character(s) could not be converted
when i use turkish characters to insert i get this error. my question is how can i disable that converting thing? im connecting to sql server via freetds and unixodbc.
than...
I have one shared object (a.so) which has statically linked (s.so). b.so also has a static link of s.so.
a.so does a dlopen on b.so , will "s.so" code be shared between the two?
The .so are built on gcc 4.1 on RedHat linux.
The s.so is compiled against a.so and b.so with -Bstatic and --no-whole-archive option.
...
This instance of JBoss deploys several war files. The rest of the JBoss startup takes about 5 minutes or less. But when it gets to one particular war file, startup just hangs with no further output to the jboss log. It waits there for about 15 minutes and then suddenly the war starts deploying. The rest of the JBoss startup is then f...
i'd like to put a kind of lock file in the user's home directory on linux(from c++) but fopen'ing ~/.fluudit doesn't seem to work.
fopen("~/.fluudit","w"); //fails
...
I have a lot of code in an ELF shared library that is only used during library initialization (it's called from static initializers). If I put this code in its own section (or perhaps it can go in the .init section), which I can do using __attribute__((section(".mysection"))), is there a way to force this section to be paged out after t...
I want to create a near 100% load on a Linux machine. It's quad core system and I want all cores going full speed. Ideally, the CPU load would last a designated amount of time and then stop. I'm hoping there's some trick in bash. I'm thinking some sort of infinite loop.
...
Hi,
I am a beginner developer want to develop a MP3 to AAC converter for Linux. But I don't know how to start as I havn't done any development in Linux before. I am using Ubuntu 10.04. Can anyone tell me how to start and from where? What libraries do I need?
Thanks
...