UNIX/Linux Programming - May 2015

Signal Handler for all 64 signals
 
please let me know a quick way to write default signal handling for all 64 signals in Linux system call? switch statement, comes to my mind..Any quicker way?...
[1 reply] : You can try a for-loop: for all the signals call signal( signa... (by koothkeeper)
How read serial without consume byte
 
Hi! I have to develop API that when arrive byte by serial communication, only consult the serial without consume byte of serial fifo. Is it possible? T...
[1 reply] : Depending on what class you use, it's possible. You can use putback()... (by koothkeeper)
Why close other end of pipe?
 
Why a process should close the other end of the pipe that it doesn’t use ?
[5 replies] Last: Thanks dhayden...sorry for misunderstanding booth (by csstudent123)
by mogha
Data Shared Memory
 
Hi, I have data shared memory which i am using as lookup space.I have key and its associated data which i am storing in DSM(data shared memory)In certain cas...
[6 replies] Last: You said it's in shared memory, which means it's shared between proces... (by dhayden)
How to make the gotoxy function??
 
Hi everybody. I am trying to program ascii games in the console, such as the snake, or the tron, and I need to use the function gotoxy to set the cursor positio...
[2 replies] Last: Curses would be the best solution for a full on, text-based app. But y... (by andywestken)
Stack Smashing detected in IPC
 
program 1 to send message: #include<iostream> #include<sys/msg.h> #include<sys/ipc.h> #include<cstring> #include "globals.h" using namespace std; int main...
[2 replies] Last: I am following the examples from handouts to solve new problems, (by csstudent123)
An example of waitpid()
 
I want to modify this program using waitpid() only to output 121 #include <iostream> #include <unistd.h> using namespace std; int main () { pid_t chil...
[no replies]
Error with Vector of Vectors of Custom struct
 
static struct Color //line 31 { double x, y, z; std::string hex; }; static std::vector<std::vector<Color>> mtlColors; Output: Linux.h:...
[5 replies] Last: I was using it as a single vector, not a vector of vectors. Sorry. Tha... (by closed account NUj6URfi)
by mogha
makefile
 
In one of make file from my project i encounter below LDFLAGS LDFLAGS += --hash-style=sysv Could somebody help me in understanding meaning of --hash-style...
[2 replies] Last: Idea is to build the application of CentOS Linux release 7.0.1406 (Co... (by mogha)
by ugiwgh
memcpy poblem
 
Is there any diffent between memcpy(dest,src,srcsize) and memcpy(dest,getdata(),datasize)? Any help will be appreciated.
[3 replies] Last: I'm going to guess that `getdata()' is returning the memory address of... (by ne555)
Hey im new learning sockets in linux
 
Hello would someone be able to give me the source for a server and client. Not to copy and paste, But for me to examine. I have learned the basics. I also ...
[2 replies] Last: No this is good thank you learning alot from it thanks again. (by Cylarnet)
Running Opencv sample in linux terminal
 
I want to run select3dobject.cpp from opencv samples in ubuntu 12.04 virtual machine terminal .I succeeded to compile the code but I could'nt run it. Anyone can...
[3 replies] Last: The program will generate a lot of images, the output_prefix refers to... (by ne555)
FOrk and processes, how does it work
 
Hi. I do know the concept of process, but I do not know how it relates with fork(); Suppose I write a c program with a statement printf. If I use fork(...
[5 replies] Last: thanks (by csstudent123)
Comparing a double with another calculated double fails on 32Bit Linux only
 
Hi, Why does the following two "if"-statements result in two different behaviors (on Linux 32Bit only). On Windows (with MS-Compiler) or on Linux 64Bit bo...
[2 replies] Last: Thank you for your answer. It is clear that i can't expect same resul... (by sneakfun)
by mogha
TCP
 
Hi All, I am looking for the code/logic to extract TCP timestamp. (a) Sender timestamp (b) Reply timestamp Appreciate any input on this. Thanks
[no replies]
Help! Need to design and implement a basic shell
 
Hi guys. Please any input from you will be very helpful. I am trying to design a shell with the following requirements. The most rudimentary shell is structure...
[2 replies] Last: thanks, will search, if any prob I come back (by csstudent123)
by oseri
GDB setting a breakpoint in a strange file
 
I'm learning GDB, and trying to step through my singleton program. Now, I would expect that break 6 would set the breakpoint in a file specified at gdb start...
[1 reply] : You are probably being bitten by compiler optimization -- add -O0 (tha... (by koothkeeper)
Help with regular expressions
 
Help with regular expressions I do not speak English'm using a translator I am trying to extract text from a string that contains HTML example: <div> text...
[1 reply] : #include <stdio.h> #include <iostream> #include <regex> #include <str... (by ne555)
Difficulty with classes and pointers
 
I want to make an histogram of a particle that isn't defined in the classes files. Here is my code: #include "SampleAnalyzer/User/Analyzer/user_1.h" #inclu...
[5 replies] Last: bool user_1::Execute(SampleFormat& sample, const EventFormat& event) ... (by ne555)
by dezire
Combining Multiple Behaviors- Robotics
 
hi .. i ham working on Player/stage project and i need to compile multiple behaviors . I have to make robot move from one position to the goal position without...
[no replies]
May 2015 Pages: 12
  Archived months: [apr2015] [jun2015]

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