Skip to content
Advertisement

Tag: c++

Send and receive Hex String from linux Server C#

I’m developing an developing a little software in c# that connect to a Linux server. the software send a HEX String and receive a HEX String Back. here is my code an example of a string is 0x30 0x30 0x30 0x30 0x30 0x30 0x30 0x34 0x03 0x30 0x30 0x30 and the response is this 30 30 30 30 30 30

Error when trying to deploy Qt application using shared libraries

I tried to deploy a qt application using the shared library approach described here: http://doc.qt.io/qt-5/linux-deployment.html (5th headline) When I go to my project folder and type “make clean” I get this error: “make: *** No rule ro make target ‘clean’. Stop” What is the problem here? Also: The documentation states: “We assume that you already have installed Qt as a

What is the maximum number of threads that std::async will create and execute asynchronously?

I have a large number (>>100K) of tasks with very high latency (minutes) and very little resource consumption. Potentially they could all be executed in parallel and I was considering using std::async to generate one future for each task. My question is: what is the maximum number of threads that std::async will create and execute asynchronously? (using g++ 6.x on

Poco C++ Libraries: “Not found: mysql”

I am using poco-1.7.7 with MySQL. I am building with g++ on Ubuntu. Building, linking and running works fine. However, when a Data Session is created, an exception “Not found: mysql” is thrown: The mysql client is installed and is part of $PATH. Additional information: I am running Ubuntu using Docker. See below for Makefile. The same code can connect

Generate raw binary from C code in Linux

I have been implementing just for fun a simple operating system for x86 architecture from scratch. I implemented the assembly code for the bootloader that loads the kernel from disk and enters in 32-bit mode. The kernel code that is loaded is written in C, so in order to be executed the idea is to generate the raw binary from

Linux best practice to start and watch another process

In my process I need to start/restart another process. Currently I use a thread with a tiny stack size and the following code: I feel like that’s not best practice. I have no idea about the resources the std::system() call is blocking or wasting. I’m on an embedded Linux – so in general I try to care about resources. Answer

can /proc/self/exe be mmap’ed?

Can a process read /proc/self/exe using mmap? This program fails to mmap the file: Answer You are making 2 mistakes here: Mapped size must be > 0. Zero-size mappings are invalid. You have to specify, if you want to create a shared (MAP_SHARED) or a private (MAP_PRIVATE) mapping. The following should work for example: If you wish to map the

Advertisement