UNIX/Linux Programming - May 2016

Why CPU usage of daemon (accept) icreases so much ?
 
I'm writing a client-server application, using the accept() function like as follows, accept (sockfd, (sockaddr*)&addr, &addrlen); Petitions resolve fine ...
[1 reply] : We really do need some more information to answer your question... (by tcs)
Disk Space Usage Profiling
 
Hi all, I am running C++ program on Linux, This program creates temporary files on the Hard Disk to compute its result. I need to know how much space does thi...
[1 reply] : If you don't have access to your programs source code then you may wri... (by tcs)
Insert char(0) into Mysql
 
Hi, I write in c and use mysql.h. It works :) I need to write a char * into my Mysql's table. But my char * has some char(0). Here is my sample : --...
[5 replies] Last: I thought MySQL would automatically convert \0 into a null character. ... (by Peter87)
Memory Map - Is It Possible To Create A Pointer That Points To Specific Address?
 
I am currently writing a program that requires me to find certain files in map based on their permissions and use "munmap" to unmap them. I have done this but m...
[5 replies] Last: Figured it out, for those who see this, 1) convert it to long int usi... (by ChillMick)
Error Help
 
I am writing a code for my c++ class that is a very basic form of tetris with only one block. As of now the program generates a block that falls on its own and ...
[2 replies] Last: Could you explain that a little further? I am very new to programming ... (by jkotsch)
3 arguments to main???
 
I stumbled across this ( http://www.bogotobogo.com/cplusplus/cplusplus_keywords.php ) article which refers to there being 3 arguments to main like so: int ...
[2 replies] Last: Thank you so much. Your answer makes perfect sense. Thank you for expl... (by da peppester)
by sever
Searching for a network function...
 
Hi folks, I'm working in a daemon that needs to identify if a binded node (identified by an address, expressed in IPv6) belongs to an specific subnetwork. ...
[1 reply] : Do you mean something like these: http://www.retran.com/beej/sockaddr... (by keskiverto)
passing char array to a function
 
Hi every body I need to know how I can pass an char array's elements such as argv = "./run_single_zone" argv = "data_pub/my_net.xml" argv = "data_pub/zo...
[1 reply] : Try run_single_zone(5, argv); (by Peter87)
by Berrrt
UDP socket problem
 
Hi! I had a working c program for a udp socket. For updating it to c++ I only needed to add: #include <arpa/inet.h> // For inet_addr() The file...
[1 reply] : It's strange for inet not to be available. Have you thought about jus... (by Krisando)
Linux Keyboard Events
 
Hi All, I am building a small game engine for the Raspberry Pi using OpenVG. The graphics side of things is perfect now adding a library to detect keyboard in...
[no replies]
by MCCodo
New to linux kernel
 
Hi I bought a book called Linux kernel development 3rd edt. by Robert Love. My question is "Is that a good book to learn more about Linux and its kernel ?...
[2 replies] Last: http://stackoverflow.com/questions/10469188/is-it-possible-to-develop-... (by keskiverto)
Regex giving wrong result?
 
I'm trying to parse this input: wc -w -l -c text.txt using this expression: ^wc (?:(-. )*)([a-zA-Z0-9_\\. \\-]+)$ but the expression won't compile w...
[4 replies] Last: that kind of is a C code :/ I'm forced to use C for this (by mekkatorqu)
by zezeon
c++11 concurrency error
 
#include <future> int main() { auto f = std::async( (){return 3;}); return f.get(); } g++ -g -std=c++11 -lpthread : I compiled with these options ...
[6 replies] Last: Its better to use the compiler flag -pthread than the linker flag -... (by Galik)
  Archived months: [apr2016] [jun2016]

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