linux

What are some good ways to do intermachine locking?

Our server cluster consists of 20 machines, each with 10 pids of 5 threads. We'd like some way to prevent any two threads, in any pid, on any machine, from modifying the same object at the same time. Our code's written in Python and runs on Linux, if that helps narrow things down. Also, it's a pretty rare case that two such threads wan...

Developing installation packages in Linux

I need information about making installation packages for Linux. I want to make simple package, containing executable + shared libraries, and SDK package for programmers, with executables and h-files. How can this be done? Articles, books, samples - everything that can help to learn this issue. ...

Unidentifiable Vim Keymap

Hi I'm trying to get rid of a pesky keymapping in vim, namely \c The mapping is only loaded for latex files, so it should be related to the latex-suite. It's annoying, because it can't type \cite without this keymap ruining everything. I can unmap it "manually" by typing: :unmap! \c But this doesn't work when I put that into my ...

How can I find out where is my code causing GLib-GObject-CRITICAL

Hi, When I c/c++ application fails with the following CRITICAL, can you please tell me how can I find out where is the code causing the error? I have tried to run it in Debugger, trying to do a 'bt when the program fails. But it does not show where is the code causing the CRITICAL: (process:3155): GLib-GObject-CRITICAL **: /build/build...

Unsatisfied link error under Maven exec / debug plugins on Linux

Hi. I'm getting a runt-time "Unsatisfied link error" for libraries installed in Linux system library, which are definitely visible. This project works normally when I let Eclipse to manage it. Does someone know if there any caveats regarding JNI and Maven, and can advice about this case? Thanks in advance. ...

Nexus One Android Debugging in Ubuntu 9.10

I can't get Ubuntu 9.10 to recognize the Nexus One as a debug device. I tried following the instructions found here but they are not working: http://alan.lamielle.net/2010/01/22/nexus-one-usb-in-ubuntu-9-10 Anyone know of a link or know how to get the Nexus One to debug correctly in Ubuntu 9.10? ...

Help with SVN+SSH permissions with CentOS/WHM setup

Hi Folks, I'll try my best to explain how I'm trying to set up this system. Imagine a production server running WHM with various sites. We'll call these sites... site1, site2, site2 Now, with the WHM setup, each site has a user/group defined for them, we'll keep these users/groups called site1,site2 for simplicity reasons. Now, updati...

Howto Pass A String as Parameter in AWK within Bash Script

I have a text file which I want to filter using awk. The text file looks like this: foo 1 bar 2 bar 0.3 bar 100 qux 1033 I want to filter those files with awk inside a bash script. #!/bin/bash #input file input=myfile.txt # I need to pass this as parameter # cos later I want to make it more general like # coltype=$1 col1type="foo" ...

Programmatic use of ARP

I have a need for some C or C++ code, compilable under Linux, to be able to take a list of IP addresses of some arbitrary number of remote hosts machines and obtain a ethernet MAC address for each one. These host machines may be on the same subnet or they could be on a different subnet behind a router. Its OK if the MAC address of some o...

What is the best and useful debug tool in Linux environment for Perl and C++ scripts?

What is the best and useful debug tool in Linux environment for Perl and C++ scripts? In related to that, does anyone know the differences between Eclipse to DDD tools? Thank you, YoDar. ...

Do you know of a C dictionary that supports COW transactions?

I'm looking for a key -> value dictionary library written in C that supports a theoretically unlimited number of cheap transactions. I'd like to have one dictionary in memory, with hundreds of threads starting transactions, possibly modifying the dictionary, ending (completing) the transaction or potentially aborting the transaction. On...

Linux directories

I am writing installation script for my program, which is supposed to run on Linux/Unix OS. What is the default directory for the following files: Executable files (programs). Program should be executed by typing its name from the command line. Shared libraries. Third-party shared libraries (the program is not open source, so I need to...

To catch or not to catch

Should application catch "bad" signals such as SIGSEV, SIGBUS? ...

Custom installation directories

Let's say I am writing installation script for the program which contains executable file and shared library. By default, this script places executable to /usr/local/bin, and shared library to /usr/local/lib. In this case my program may be executed by any user by typing its name in the command line. Suppose that user selects custom inst...

Problem with setjmp/longjmp

The code below is just not working. Can anybody point out why #define STACK_SIZE 1524 static void mt_allocate_stack(struct thread_struct *mythrd) { unsigned int sp = 0; void *stck; stck = (void *)malloc(STACK_SIZE); sp = (unsigned int)&((stck)); sp = sp + STACK_SIZE; while((sp % 8) != 0) sp--; #ifdef li...

Seam on Linux Problems

Hi, When a seam application on JBOSS using java 1,5 is deployed in Unix platform, I am getting this error. errorjava.lang.NoClassDefFoundError at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:141) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi ronment.java:62) It runs fine on w...

What are the pro and cons of statically linking a library?

Hi, I want to release an application I developed as a hobby both for Linux and Windows. This application depends on boost (and possibly other libraries). The norm for this kind of application (a chess engine) is to provide only an executable file and possibly some helper files. I tough it would be a good idea to statically link the lib...

Programming with USB Missile Launcher under Linux

Hey! Just got today these ones: http://www.pearl.de/a-PE5858-1413.shtml I want to start programming with these, but I can't find anything usable. I'm using Ubuntu Jaunty 9.04. The Problem is that I couldn't find much samples and modules etc. for my modell. ...

how to get the memory mapping for a core on Linux/HPUX (pmap)

On solaris i can run the pmap command on a core file to get the memory map of a crashed process. Unfortunately the pmap command available on HPUX and Linux doesn't provide this option. Any pointers how i can get this information on these platforms? Thanks! ...

'htdocs' folder in XAMPP for linux belongs to "nobody" after installing, why?

Hi, after installing XAMPP on linux i have seen the folder "htdocs" belongs to "nobody". Has this any intention? Do you think owning that folder is a good practice? Regards Javi ...