linux

GTKMM/C++ Window Event on loosing/regaining focus?

How can i call a function whenever my gtkmm app looses or regains focus? Thanks. ...

Why do debug symbols so adversely affect the performance of threaded applications on Linux?

Hi. I'm writing a ray tracer. Recently, I added threading to the program to exploit the additional cores on my i5 Quad Core. In a weird turn of events the debug version of the application is now running slower, but the optimized build is running faster than before I added threading. I'm passing the "-g -pg" flags to gcc for the debug...

Packaging multiple rpms in one file

Hi, Is it possible to paqckage multiple rpms into one file. I have got two bundles one of which requires that the other be installed. I would like to create a single installable out of them in such a way that this installer will first invoke pkg 1 and then install pkg 2. Is this possible? What about deb packages? Sorry if it a basic ques...

HeapCreate, HeapAlloc in Linux, private allocator for Linux

Hi, In Windows, for very demanding applications, a programmer may use HeapCreate, HeapAlloc in order to better manage and control the allocation of memory- speed it up (aka private allocators). What is the equivalent in Linux c++ programming? ...

Editing Subversion post-commit script to enable automated Hudson builds

Hey guys, I'm not so good with Linux, but I need to modify the post-commit file of my Subversion repository to get Hudson to build automatically on commits. This page here tells me to do this: REPOS="$1" REV="$2" UUID=`svnlook uuid $REPOS` /usr/bin/wget \ --header "Content-Type:text/plain;charset=UTF-8" \ --post-data "`svnlook chan...

Ubuntu's file-roller problem 5010. "Cannot open display"

Hello everybody! I use "file-roller" to manage with archieves on my Ubuntu. But it fails on running without user interface(just teminal). The error is shown below. ** (file-roller:5453): CRITICAL **: Failed to parse arguments: Cannot open display: How can I prevent file-roller from using GUI or can you recommend me any other archieve...

Reading a variable messes it up?!?!

We have the following line of code: printf("%d\n", toc->runlist.next); printf("%d\n", toc->runlist.next); These are the definitions: typedef struct thread_overview_control{ int id[NR_UTHREADS]; list_t runlist; int active_counter; int main_thread; int need_resched; } thread_overview_control; thread_overview_cont...

Mono's XSP webserver can't find MySql.Web.dll on Linux

Hello, I'm working on getting my ASP.Net project working on Linux. I've been testing my code using XSP on windows, but now I am trying to make sure that I can develop and test on Linux as well. To that end I've gotten Ubuntu running and have MonoDevelop and MySQL running. I've downloaded the latest MySQL Connector/Net and I think I have ...

Strange results while measuring delta time on Linux

Update: fixed delta calculations in code, still the issue remains Folks, could you please explain why I'm getting very strange results from time to time using the the following code: #include <unistd.h> #include <sys/time.h> #include <stdio.h> int main() { struct timeval start, end; long mtime1, mtime2, diff; while(1) { g...

Java OutOfMemoryError due to Linux RAM disk cache not freed

The process will run fine all day, then, bam, without warning, it will throw this error. Sometimes seemingly in the middle of doing nothing. It will happen at seemingly random times during the day. I checked to see if anything else was running on the machine, like scheduled backups or something, but found nothing. The machine has enough ...

UDP socket persists in "Established' state -- WTW?

I have an application which occasionally leaves an entry in the output of the netstat command which indicates a UDP socket is associated with a port on another machine, and the state that the netstat command reports is "established". To my understanding, this does not make sense -- UDP is a connectionless protocol, right? When this hap...

How to take snapshot of PDF file in linux?

How I can take snapshot of first page of PDF file in Linux? I wanna do this on VPS server automaticaly. My distribution is Debian. ...

accessing a file

On Linux, how can I make sure that my program is the only one accessing a file? ...

Linux System Programming

I wanted to get into systems programming for linux and wanted to know how to approach that and where to begin. I come from a web development background (Python, PHP) but I also know some C and C++. Essentially, I would like to know: Which language(s) to learn and pursue (I think mainly C and C++)? How/Where to learn those languages sp...

Spring ResourceServlet throws too many open files exception in jetty and tomcat under linux

I was running the petclinic example that was created with spring roo, also I test booking-mvc example that comes whit spring webflow 2.0.9 and the same happens, this is when I reload the main page many times. If I remove the lines from both examples there is no error. < spring:theme code="styleSheet" var="theme_css"/> <spri...

Advantages of Using Linux as primary developer desktop

I want to get some input on some of the advantages of why developers should and need to use Linux as their primary development desktop on a daily basic as opposed to using Windows. This is particulary helpful when your Dev, QA, and Production environments are Linux. The current analogy that I keep coming back to is. If I build my demo...

[Linux] Coding a GTK+ application without window manager?

Hi, I want to code sth. that basically works like TiVo. Switch it on, you only see the menu or an output, so no underlying OS or anything else is directly visible to the user. So I want to use Linux as base. Can you suggest a good base distribution? Can I code a frontend without having a window-manager up and running? If yes, is tha...

compile with -ansi -pedantic -Wall switches automatically with gcc

We are required to compile C source codes using gcc in this manner: gcc -ansi -pedantic -Wall program.c I'm wondering how can I 'automate' this so when I enter: gcc program.c It will automatically compile with the 3 switches. Is this possible? ...

bluetooth application devlopment

i want to devlop bluetooth(c/c++) applications in linux can any one help me how to and where to start ? can any one one provide me proper tutorial ?? ...

where did the _syscallN macros go in <linux/unistd.h>?

It used to be the case that if you needed to make a system call directly in linux without the use of an existing library, you could just include <linux/unistd.h> and it would define a macro similar to this: #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ type name(type1 arg1,type2 arg2,type3 arg3) \ { \ long __res; \ __a...