UNIX/Linux Programming - February 2020

When to start counting (to test module load time)
 
Hi, I made a c program to load a module and create a /proc file that will show the number of seconds since the module has been loaded. (Theoretically, at thi...
[2 replies] Last: Thank you. And it was right! I was pleasantly surprised. (by jjordan33)
timeout on write() for linux pipe
 
How can I set timeout for write() on linux pipe ? example code: int fd_pipe = open("/run/some/pipe", O_RDWR); // here i need to set timeout for 3 secon...
[4 replies] Last: That isn't what you asked for. You asked for a write timeout. That c... (by kbw)
by elb
unix C++ solution to getch() question
 
This post asks about the equivalent of getch() from <conio.h>. http://www.cplusplus.com/forum/unices/264588/#msg1140069 As was mentioned in that thread (now ar...
[3 replies] Last: You need to test if the input stream has anything to read. You can do... (by kbw)
Fork and execute (1,2)
 
Hi, so I'm slowly trying to wrap my head around creating my own shell simulator. As far as I can understand it, the general steps are to: loop driver to contin...
[20 replies] Last: Thanks for responding to this! I always want to know how to better cod... (by jjordan33)
error linking boost library to cmake
 
I am trying to link boost library to my c++ project using cmake. Here is the cmakelists.txt file: cmake_minimum_required(VERSION 3.2) project(deye) find_pack...
[1 reply] : you are not linking against boost libraries target_link_libraries(${... (by ne555)
making member required
 
I have a struct : struct Vector { vector<pair<int,int>> pnts; int ind; } When i use this struct how do i make it such that the ind also have to be specifie...
[1 reply] : It's hard to figure out what you are trying to do. Could you give us ... (by elb)
by FoxMan
XML booleans and loops proccesed on C++
 
I have an XML file that contains a structure with loops and booleans expressions, but as this XML file is always changing, as the data comes from a user-defined...
[1 reply] : I need to interpret this Right: there's your starting place. There ... (by mbozzi)
Run batch file from a c progam in linux
 
Hi, this is going to sound like a pointless question since it should be easily tested myself, but here me out first. Can you use the following command in a ...
[9 replies] Last: You're correct. I was confused about directions. (by jjordan33)
  Archived months: [jan2020] [mar2020]

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