UNIX/Linux Programming - March 2011 (Page 2)

by oxyg3n
Looking for a mentoring
 
Hello. I'm not a newbie in the programming, and have certain skills in C++ and some knowledge of system programming from my university course. I have written so...
[1 reply] : I have a linux file manager that I am working on. https://launchpad.ne... (by strongdrink)
qn on zombie processes
 
if the signal handler of SIGCHLD is set to SIG_IGN, then if I fork a process and the parent terminates before the child, will the child still become a zombie pr...
[6 replies] Last: then in what circumstances are zombies or orphan processes created? ... (by closed account z05DSL3A)
grep
 
I cant figure this out, new to Unix. Any help at all would be appreciated! Suppose you were working a crossword puzzle and needed a 6-letter word beginning w...
[6 replies] Last: Just a fix I just came up with, you should replace the dot after wit... (by hanst99)
Do I need to lock a shared variable of type volatile sig_atomic_t in a multithreaded program?
 
Q1) Do I need to lock a shared variable of type volatile sig_atomic_t in a multithreaded program? Q2) also, is it safe to call pthread_mutex_lock or pthread_rwl...
[3 replies] Last: Let's say I have a volatile sig_atomic_t variable that currently has t... (by jsmith)
Endian Swap - Big Endian System
 
8-Byte Swap from little to big endian: Little Endian: 05 d2 45 2c Big Endian: 2c 45 d2 05 The big endian system will read the first byte of 2b,...
[1 reply] : MSB on the left. (by jsmith)
shared libraries in C++
 
Hi, I have a files A.h, A.cpp, B.h and B.cpp that has declarations and definitions for classes A and B respectively. Class B uses some interfaces of class A. N...
[4 replies] Last: Just FYI, there are other (arguably better) alternatives to using LD_L... (by moorecm)
SOIL problem
 
Hello there, I've got a big problem. I attend to OpenGL courses on my university. On the second lesson our teacher introduced the SOIL library. I have much exp...
[1 reply] : Ok, I found it. I just change the command to: <code>g++ -I/usr/include... (by Garrappachc)
64bit binary string to double
 
Hi all, I have binary string like this "0011010000110000001100010011000000000000000000000011111101000011". I need to convert it to double. The string may be les...
[7 replies] Last: If all possible return values are valid, to return errors you can eith... (by Zhuge)
by gedas
Embedded C pulse counter
 
hey guys, i have to design and implement the pulse counter and draw a function of a number of pulses read in one second on the screen. i have draw function (...
[no replies]
pthread: return vs pthread_exit(), and the value returned
 
Hi all :) If the routine of a pthread were to return a pointer to a string (return acts as pthread_exit()) where on earth could that pointer be accessed in t...
[2 replies] Last: Hi, sorry , I realise I posted in the wrong section, so I posted here.... (by flldom001)
having server start|stop|restart mechanisms
 
hi, I'm writing a server program but wish to have something like the following: ./server start ./server stop or ./server restart to manipulate the inst...
[11 replies] Last: Using OS provided signals works but an alternative solution is for you... (by sohguanh)
C++ network programming
 
Hi, I have a client which uses UDP to receive messages on Linux. The messages can be one of the many structures defined by my program. All structures have this...
[8 replies] Last: Not providing any solution here but just want to recommend messaging s... (by sohguanh)
by asdf
Cobweb
 
How could I make a Cobweb like this one for example? http://www.google.com/imgres?imgurl=http://elishapeterson.wikidot.com/local--files/technotes:geogebra-cobw...
[1 reply] : See "How cobwebbing works" in the same article. (by hanst99)
by Pok
UDP Client Server Program
 
Hi....I have this UDP Socket program where i need to type the string "My name is John" in client and server should return that "your ID is 1234". I am trying to...
[3 replies] Last: I've had another look at this, and looked at the definition of struct... (by kbw)
locking the end of the file for appending
 
hi, I'm using fcntl for file locking but if say I want to lock just the end of the file for appending, what values do I put into the flock structure? I know th...
[7 replies] Last: say I have these values, l_whence = SEEK_END; l_start = 0; l_len = ... (by unregistered)
building and distributing in Linux
 
Hi all I'm posting as I am just moving from windows only programming using msvc++ to linux. I've tried the Kdevelop and Eclipse IDEs and can get basic projects...
[4 replies] Last: There may be problems if you use a different library version than the ... (by Bazzy)
memory leak - possible bug in <string>?
 
Is this a bug? A private string in a class is not cleaned up when the class is destroyed. Here is a simple example... This is the class: #include <stri...
[6 replies] Last: It's the scope of your variables. the first calls the destructor at... (by bigearsbilly)
who cmd into an array
 
What is a good way to assign the output of system("who -u | grep comcast") into an array? Would writing the system output into a file then reading the file i...
[2 replies] Last: I always like to use popen() in these situations. Do a man on popen. ... (by kooth)
alternative for ungetch( ) in UNIX
 
I cant use CONIO.H in UNIX ..please suggest me an alternative for ungetch() function in UNIX
[1 reply] : http://pubs.opengroup.org/onlinepubs/007908799/xsh/ungetc.html (by kbw)
March 2011 Pages: 12
  Archived months: [feb2011] [apr2011]

This is an archived page. To post a new message, go to the current page.