Skip to content
Advertisement

Tag: c++

Is there a way to understand that Linux system will not provide any TX timestamp?

I am exercising Linux timestamping functionality (TX part): https://docs.kernel.org/networking/timestamping.html It looks like there is no easy way to understand that the system will never provide me with TX timestamps at runtime. It means that I can enable TX timestamping via setsockopt without an error: even on a system which does not support TX timestamps at all. And then I can

can I reuse the socket when update SSL certificate?

The old SSL certificate has expired and I want to renew the SSL certificate. However, the server already has established multiple links with other clients. So, can I just bind the old sockets to the new ssl, which means I don’t need to disconnect the old base tcp links? Answer Existing TLS connections don’t need to get updated with a

Multi-Process Shell in C, using Pipes [Linux]

I’m trying to code a shell in C that supports multi-pipe process handling, depending on the amount of separate processes given by the user, and each separated by a “|” symbol. The shell forks the amount of processes into a child for each process. Here’s an example: result: 1 But I’m having trouble with communicating between children and finally to

How do I read a dbus array of dicts with the c api sd-bus?

I am try to read a dbus data structure that looks like this a{sv} with sd-bus but when i use the code down below i can only read one of the 8 dicts. I have looked up the function sd_bus_message_enter_container on hotexamples.com and all of them seemed to have while more than one loop around the function that enters the

why called function can get arguments of parent-function by va_start()?

I implemented a function with variable arguments below: Then I hope to implement another named “errExit()” based on the function above. I just tried like below.It works as I hoped but I dont’t think it correct. I tried errExit(“hello,%s,%s,%s”, “arg1″,”arg2”, “arg3”); and it printed “hello,arg1,arg2,arg3” correctly. But after I added two line code like below, it throwed error Segmentation fault.

Should fsync() be called before or after write() call?

I understand the working of write() call wherein it writes the data only to kernel’s buffers which is later written to disk by kernel after sorting the data optimally. Calling fsync() on file descriptor makes sure that data is written to disk as soon as it’s posted in the kernel’s buffer. My question is, whether fsync() should be called before

Understand shell script interpreter with custom shell [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 months ago. Improve this question I try to understood how shell script interpreter working. for example i wrote custom shell with c++ : now i wrote a script like this

Advertisement