linux

10 character id that's globally and locally unique

Hi there! I need to generate a 10 character unique id (SIP/VOIP folks need to know that it's for a param icid-value in the P-Charging-Vector header). Each character shall be one of the 26 ASCII letters (case sensitive), one of the 10 ASCII digits, or the hyphen-minus. It MUST be 'globally unique (outside of the machine generating the i...

when a process is killed is this information recorded anywhere?

Question: When a process is killed, is this information recorded anywhere (i.e., in kernel), such as syslog (or can be configured to be recorded syslog.conf) Is the information of the killer's PID, time and date when killed and reason update - you have all giving me some insight, thank you very much| ...

64 bit shared memory segment C \ linux problems

Hi, I'm looking to do some IPC with shared memory segments in C \ Linux. I go on creating it like normal : typedef struct { int a[2]; } shm_segment; ... shm_segment *shm; int shm_id; int shm_flags = IPC_CREAT | 0666 int shm_size = sizeof(struct shm_segment) key_t key = 88899; shm_id = shmget(key, shm_size, shm_flags); // ies t...

Can I programmatically pick and choose which core of a multi-core CPU my thread should run on?

Or is it controlled by the operating system? I hear the new Go language from Google has built-in features for a programmer to go that granular, or have I understood it wrong? ...

What exactly is the difference between multi-threaded processing and parallel processing?

Single core CPUs or a machine with a single CPU cannot do parallel processing. True/false? In a single core single process CPU there can be only one thread's assembly instructions getting executed regardless of however many processes with however many threads are running (sleeping threads excluded) at any given time. True/False? Sorry...

Does GPL code linking with proprietary library depend which is created first?

Microsoft creates their windows and MFC DLL library, etc. An open source develop write a new MFC application and release the source code as GPL. The app has to link with the MS DLL/libraries to run in Windows, but I don't think anyone can argue that we now have the right to force the Microsoft's GPL their DLL. Does this mean the GPL...

How to configure grails classpath in order to add "src/groovy" folder ( in Linux environment)?

Hi, I am currently porting my development environment from Windows to Linux. Under Linux, I noticed a "No class found" compilation error related to my classes in the directory <PROJECT_HOME>/src/groovy. Under windows, it works fine. Is this "src/groovy" directory included in the CLASSPATH when running "grails run-app" ? Why does it ...

Deleting And Reconstructing Singleton in C++

Hi all, I have an application which runs on a controlling hardware connected with different sensors. On loading the application, it checks the individual sensors one by one to see whether there is proper communication with the sensor according to predefined protocol or not. Now, I have implemented the code for checking the individual s...

libmysqlclient15-dev on macs?

Does OSX need an install of libmysqlclient15-dev? I'm trying to compile a gem that is failing and a lot of sources says to install "libmysqlclient15-dev" but I only see this for Linux, not OSX. Am I missing something here? ...

Reopening a closed Piped read file descriptor?

Hi all, I have used pipes to facilitate interprocess communication. They work just fine. But in my scenario I want to close and reopen the read end of the file descriptor fd[0]. Does anyone know how to do that? ...

Creating portable Django apps - help needed.

I'm building a Django app, which I comfortably run (test :)) on a Ubuntu Linux host. I would like to package the app without source code and distribute it to another production machine. Ideally the app could be run by ./runapp command which starts a CherryPy server that runs the python/django code. I've discovered several ways of doing ...

How does a process come to know that it has received a signal

Hi, Please correct me if i am wrong. Here is my understanding about signals: As far as i know, signal generation and signal delivery are 2 different things. In order to generate a signal, the OS simply sets a bit in a bitarray maintained in the Process Control Block(PCB) of the process. Each bit corresponds to a particul...

PDFTK and PDF2PS not playing well together

I have set up PDFTK so that I can rotate a pdf 90 degrees to print it landscape mode. Have had no luck rotating using lpr, so I am trying to rotate before I send to the printer. Once I use PDFTK the created PDF files appears to be rotated perfectly. It then gets translated into a postscript file, using pdf2ps, and when it is sent to th...

Jboss war redeployment Zipexception

All, Server: jboss-5.1.0 Java Version: jdk1.6.0_14 Deployment Method: ant v1.7 Error: 08:40:04,260 WARN [ZipEntryContext] IGNORING: Failed to reinitialize context: vfszip:/home/username/jboss-5.1.0.GA/server/default/deploy/deployment.war java.util.zip.ZipException: error in opening zip file Error occurs if the serv...

Unable to get Wacom events from /dev/input/event*.

I have created a pygtk program to monitor the keyboard status and mouse clicks across any application (i.e. not just for my application). This uses evdev by Micah Dowty which basically monitors /dev/input/event* for output and decodes the information in a way that I can display the information to the user. The program works perfectly fo...

Disabling access to "exec" functions ?

Let's say I have a process "A" that loads a dynamic library "L". Q: Is there a way to disable access to the "exec" functions to functions inside "L"? ...

ubuntu + httprint

hi i wanted to install httprint on ubuntu, i write apt-get install httprint. it says that it cannot find package httprint. how can i get httprint? thanks ...

How to screen capture screenshots or movies on the Linux framebuffer

How can the linux frame buffer, on Cell Linux, be captured to obtain either screen shots or movies? Is there a tool to do this for a running program, or must the program writing to, and presumably controlling, the frame buffer also handle capture and recording? ...

Track process-ids of sub-/child-processes?

Hi, I need to execute and terminate/abort different shell scripts from inside Java (>= 1.5; ProcessBuilder). With the standard java mechanisms I am only able to kill the main process used for the shell script execution. When this shell script starts other processes (for instance ./foo.sh &; ./bar.sh &) then there processes are still run...

Running external code in a restricted environment (linux)

For reasons beyond the scope of this post, I want to run external (user submitted) code similar to the computer language benchmark game. Obviously this needs to be done in a restricted environment. Here are my restriction requirements: Can only read/write to current working directory (will be large tempdir) No external access (intern...