Let's say I have a python script which loads a shared library (SL) through ctypes.
The SL sets up a pthread T1
The python script configures callbacks through the SL i.e. python script calls functions from the SL with references to python callables
Now, let's say T1 calls a "callback" function, are the following assumptions true:
...
Hello! In a shell-script (or Perl) I need a subroutine that returns for all my USB devices, their device names, and, if available, their respective OBEX interfaces.
I managed to get the device names and - with obexftp --usb - the obex-interfaces.
How can I find out which device belongs to an OBEX interface number?
...
Hello all,
I'm trying to do the safe thing, and have a program that needs to runs as root to drop its privileges when it doesn't need them. This works well if I chmod my binary with the SUID bit, and make it belong to root, as now I have UID = some user, and EUID = root, so I can use seteuid(0) and seteuid(getuid()) to respectively rais...
I have a project that currently executes many native binaries using java.lang.Process. Assuming that their functionality is available in native library form - what would be the advantages of executing said library functions using JNA instead?
The process executions are fairly heavy - they take a few seconds to complete. Am I correct in...
is there a way to programatically disable the hardware prefetcher on an AMD system like you can in an Intel system as discussed in this topic
Specifically for the AMD Opteron Barcelona or Istanbul architecture.
...
What would be the advantage(s) (if any) of using 2 Queues over a Pipe to communicate between processes?
I am planning on using the multiprocessing python module.
...
Hello
I was reading today question on IDEs fo C++, and there are very good ones like Netbeans.
My question is about creating a software in C++ on Windows Environment, but let users install and run my software also on Linux and OSX.
Does netbeans has a compiler to do the job, or is there any good IDE which has a compiler for targeting...
Hi, I have an alias in bash that runs emacsclient if emacs daemon is already running and start emacs otherwise. However, in the event that a fresh instance of emacs is fired up, can I make it run in the background so I can still use that terminal (or close it)? In my bash profile, I have
alias ec="/usr/bin/emacsclient.emacs-snapshot -n ...
I have a C++ app called ./blah (to which I have the source code)
when I run ./blah
I can run "top" and see how much memory & cpu "./blah" is using.
Now, is there anyway for "./blah" to access that information itself? I.e. when I run ./blah, I want it to every second dump out it's CPU & Memory usage. What library should I be using to d...
I'm moving from windows programming (By windows programming I mean using Windows API) to Linux Programming.
For programming Windows, the option we have is Win32API (MFC is just a C++ wrapper for the same).
I want to know if there is something like Linux API (equivalent to WINAPI) that is exposed directly to the programmer? Where can I...
When a program with some theards, mutexes, shared data, file handles crash because of too much memory allocation, which all resources are freed. How do you recover?
...
Does anyone know of any tools to provide simple, fast queries of flat files using a SQL-like declarative query language? I'd rather not pay the overhead of loading the file into a DB since the input data is typically thrown out almost immediately after the query is run.
Consider the data file, "animals.txt":
dog 15
cat 20
dog 10
cat 3...
When you invoke "kill" on a parent process, are the child processes subsequently killed as well?
...
On my development server, I run svn updates to deploy bug fixes or changes to the webapp's code. Normally I run:
svn stat --show-updates
and then selectively chose which files to update; appending the selected files to the end of a svn update command.
I miss GIT's command line interface and as a concession, I just want to improve the...
So I have recently started playing with Ubuntu, PHP, and CakePHP and have been pretty happy with the LAMP stack. Except now I'm trying to build a simple web page that can display collected data in a graph. Apparently OpenFlashChart2 with the FlashChartHelper plugin is pretty good, but I cannot get it to actually display a graph. I got...
Hi
I am running on php.
And in my local I am working on windows environment so it was easy to connect to MS Access Database using ODBC connector.
But on my live server environment there is Linux so there is a problem regarding the DB connection.
So what are the steps to connect to MS Access DB in Linux environment using php.
Thanks...
printf '\e[s' will save the attributes and position of the cursor, so that the script can reset them using printf '\e[u'. But I only want to save the attributes. In other words, I want to change the color of text, print some text, and then restore the color settings at the end of the script. If I use the [s and [u sequences, I will be...
Is it possible to specify per-thread in Linux?
...
I want to use gettext for i18n. But I need to translate messeges to a different languages. Is it possible to specify a locale for a one gettext call?
...
Is there any standard way of reading a kind of configuration like ini files for linux using c? I am working on a Linux based hand held and writing code in c.
Otherwise, I shall like to know about any alternatives.
...