linux

What's the best way to determine the process ID of X server

I am assuming it can be found by reading /tmp/.Xn-lock where n is the display number, but I'd like to hear if this is guaranteed to work across all flavors of X under Linux (XFree86 and Xorg) ...

Making a crash log meaningful (c++, Linux env)

I have a compiled c++ application that produces a stack trace when it crashes. At the moment, the stack trace isn't particularly meaningful. I would like to process it so that it contains symbols, rather than addresses. Does anyone have any pointers on how I might go about doing this? ...

Execute program from within a C program

How do I run another program from within my C program, I need to be able to write data into STDIN(while execution of program i have to provide input through stdin more than once) of the programed launched (and read line by line from it's STDOUT) I need the solution to work under Linux. while going through net i found below code: #inc...

Would like to spend time in a good mind blowing problem solving discussion

Am in the preparation for an interview. I guess that there will definitely be around one hour to spend in discussing about a problem which the interviewer will present to me... So what i would like to do is, prepare for such a thing right now. If i get such programming problems, i will start to discuss with my friends and get practiced...

POSIX API call to list all the pthreads running in a process

I have a multi-threaded application in a POSIX/Linux environment - I have no control over the code that creates the pthreads. At some point the process - owner of the pthreads - receives a signal. The handler of that signal should abort,cancel or stop all the pthreads and log how many pthreads where running. My problem is that I could ...

Execute another C program from within a C program

How do I run another program from within my C program, I need to be able to write data into STDIN(while execution of program i have to provide input through stdin more than once) of the programed launched (and read line by line from it's STDOUT) I need the solution to work under Linux. While going through net I found below code: #inc...

install gcc on linux without c compiler

hi how can i install gcc on a system that have not any c compiler? this system is a linux base firewall and have not any c compiler. ...

boa webserver, sh script

I have here embedded device with linux. There is a webserver boa. http://www.boa.org/ I am trying to start sh cgi script. #!/bin/sh echo "Content-type: text/html\n" echo "Hello world !" ./script.cgi works, but in webbrowser I get 502 Bad Gateway The CGI was not CGI/1.1 compliant. Can anyone help me? ...

ISA like linux proxy

Hi I have installed jaxer server on my linux machine and there is on program which fetch URLs if its local url it works but for external/public URL it does not work I had this problem when I instilled jaxer on my windows machine which got solved after installing Microsoft ISA and configuring proxy through that. on linux what I shoul...

"Virtual folder" in Linux

I have a web service which allows the users to upload and keep track of their files on the server. What I want to do is create some sort of application which recreates my "online file system" on the local machine. Kind of like having a folder on my desktop which presents the files I have on the webserver, where I can move them, open, sa...

Extract a substring in C

Hi, i am trying to extract the username from this uri field in ANSI C code on linux using gcc mail:[email protected] so i need to strip the mail: and everything after the @. Are there any built in functions in C to extract substrings ...

Kvm disk increase

Hi, How can I increase the size of a disk allocated to a KVM machine ? It can be lvm, raw file etc. thanks ...

Makefile and QTCreator

I am new to programming under linux and not familiar with makefiles since MSVC-Express hides such things very well. But now i wanted to play with some code I found, but it won't compile in qtcreator. But with the makefile in the package i can successfully compile and use it. So all dependencies (libraries and headerfiles) must be correct...

Eclipse Make Error 127

Hey, this is my first time using Eclipse, and my first time programming in a linux environment. So I might end up posting some semi-usless information, but I'm just trying to give what ever details I can. The Issue: I'm trying to build a project, and I'm getting the following errors and warnings. The Question: What would I have to do, ...

Regarding the Single and the Double Dot within Directories

Whenever we use the command: dir --> in Windows and dir -a --> in Unix We see 2 kinds of dots: . .. Appear in the directories. Now in APUE by Stephens Rago, it says these are filenames and some books say these are directories. What are these Dots about anyway? Please provide an answer w.r.t. Windows as well as Unix if possible....

Best/easiest way to parse configuration parameters in Sh/Bash and php

Hello, I got in every php project (around 25!), some sh scripts that help me with routine tasks such as deployment, repo syncronizing, databases exporting/export, etc. The sh scripts are the same for all the projects I manage, so there must be a configuration file to store diferent parameters that depend on the project: # example conf...

Shared data location for Linux and Mac OS X

On Windows, there is a standard location for application data that is shared in common with all users on the machine (i.e. in Vista/7, (root):\ProgramData). I'm looking for a way to get such a folder on other platforms using Qt. Does Qt provide a built-in method for doing this? (QDesktopServices looked promising, but does not seem to p...

winbindd fails to resolve local network names when firestarter firewall is up on ubuntu.

I'm using Samba and windbindd on my linux boxes. Without a firewall up on the linux box I have no trouble resolving LAN machine names: user@laptop-linux:~$ ping desktop PING desktop (192.168.1.100) 56(84) bytes of data. 64 bytes from 192.168.1.100: icmp_seq=1 ttl=128 time=0.878 ms when I start the firewall I get: user@laptop-linux:...

How do I use two 32-bit integers as a 64-bit in C?

I am using a library that returns a structure with a time stamp that is represented by two (TimestampHi, TimestampLo) unsigned longs. I pretty much only need the timestamp printed out as %llu in printf. What's the easiest way to get the data from these two ints and correctly use it as a uint64_t? ...

problem with ftp pushing files and me not having access as regular user

Heya, how goes it? I've run visudo and added my username to the list to be able to do whatever I need to rather than logging in as root user. I have my svn push out file's through ftp as user www-data, and therefore when I try to cd into those directories, I get permission denied. Any thoughts? Can I add my username to some config file...