How does one determine the current stack size of a program in linux?
it is said that the stack size of each program will be 8 MB in linux but when you use
cat /proc//mmap it shows a different size.
Also, how does one determine stack size of associated threads? Since it is said that threads have their own private stack?
...
I would like to show the user some help on specific operations in my program of the form:
Please type "apt-get install foobar" to install the foobar feature.
Is there anything to do this or do i have to leave it to the user and offer a dozend choices from Red Hat, Suse, Debian/Ubuntu, Mandriva, Slackware, Gentoo ....
...
I want to run command like this:
vim -c "%g/blablabla/norm /str<ESC>cwSTR" file
How I write escape character in the command?
...
My application prints a PDF to a temporary file. How can I open that file with the default application in Python?
I need a solution for
Windows
Linux (Ubuntu with Xfce if there's nothing more general.)
Related
Open document with default application in Python
...
Hello,
I am trying to understand pthreads by example. I have made the following code that is giving different answers everytime I run! Could anyone explain the bug please?
TIA,
Sviiya
The code is here:
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#define NUM_THREADS 4
struct thread_data {
int thread_id;
...
In Gnome, whenever an application is started, the mouse cursor changes from normal to an activity indicator (a spinning wheel type thing on Ubuntu). Is there any way to inform Gnome (through some system call) when the application has finished launching so that the mouse cursor returns to normal without waiting for the usual timeout of 30...
is there an autocomplete feature for vi. ctrl p looks for keywords already used in the document. but suppose i want a.funcname to automatically show members of object a. is it possible with vi.
...
I've been reading about Linux Kernel development / device drivers and all of the books I've looked at use the pre-2.6.20 workqueue interface. This includes the Linux Kernel Module Programming Guide, Robert Love's Linux Kernel Development, and Sreekrishnan Venkateswaran's Essential Linux Device Drivers which was published in April 2008!
...
I am trying to debug an issue in my code. I have a process A which runs continuously till I ask it to stop.
Inside A I do the following:
mount partition /dev/sda1
open() // creates an empty file X
write() // write some bytes to it
close() // close the file
processFile() // Perform some operation
remove() // remove file
umount /dev/sda...
Hi,
I have installed Eclipse 3.2 in my ubuntu system.
I have added the php plugin to eclipse by following steps
Help > Software Updates > Find and Install.. > selected "Search for new features to install" and clicked "NEXT" > clicked "New Remote Site" > Gave name = "PHP" and url = "http://update.phpeclipse.net/update/nightly" > Cli...
I'm in such a trouble now
[root@jiaoyou ~]# cat /etc/issue
Fedora release 10 (Cambridge)
Kernel \r on an \m (\l)
...
How can I get the path of the shared library from within the library itself?
In other words, let's say that library X is loaded using dlopen(), how can I get access to the path that was used to load the said library from within the library itself?
Note that I cannot have the agent that loaded the library in the first place hand me this...
Hi there,
I am developing a shared library using c++ under Linux. I would like to user log4cxx for logging purposes. However, I'm not sure how to initialize this. For log4cxx I need to create a logger object. How can I make sure this object is created when my library is loaded?
I suspect that it will be easiest to create the logger obj...
Is there a good database for Linux where I can search for a function name and it tells me which header it is defined in? Googling doesn't always work for me and there aren't always man pages.
...
Which windowing system for embedded linux supports hardware overlay?
Is it possible to add hardware overlay support in Qt for embedded Linux?
...
What is the reliable way of implementing bidirectional communication to a Linux process?
I see that popen does not seem to support "r" and "w" access at the same time... or at least that's what is implied:
The type argument is a pointer to a null-terminated string which must be either 'r' for reading or 'w' for writing.
(I am so missi...
Suppose I "popen" an executable, I get a FILE* in return. Furthermore, suppose I'd like to "connect" this file to an istream object for easier processing, is there a way to do this?
...
Let's say I create a socketpair() and I pass the handle of one of the socket to a spawned process (popen), will the said process be able to communicate back with the parent?
The examples I saw are applied using fork() which is out of scope for my current project.
Updated: I tried a simple test:
Client: socketpair with sockets[0]
Fro...
When making a function call in Linux (or OS X for that matter), can the callee modify the values of the arguments on the stack? I was under the assumption that since the caller is the one that cleans them up, that they should contain the same values after the function call. However I found that GCC with -O2 was modifying parameters tha...
I've been using objdump to look at assembly code in Linux ELF binaries. Sometimes there is an indirect jump through a jump table that is stored in the rodata (read-only data) section. I have tried Google and SO, but I must be wearing my stupid hat, because I cannot figure out how to get objdump or any other tool to show me the contents...