Skip to content

Tag: c++

Sockets – keeping a socket open after data transfer

I have written simple server/client programs, in which the client sends some hardcoded data in small chunks to the server program, which is waiting for the data so that it can print it to the terminal. In the client, I’m calling send() in a loop while there is more data to send, and on the server, I&#82…

Print rectangles to terminal

I’m trying to write a text editor for Linux that looks like MS-DOS EDIT. However, I’m stuck because I can’t figure out how to draw the thin rectangles around the editor screen and dialog box. I know the Linux dialog command can do something similar: How can I draw rectangles like that around…

How do I find symbol offset in .so from runtime address

I need to be able to convert an instruction pointer (from a backtrace) into a file and line number after a program has terminated. During execution, I can store any additional information I will later require for this offline analysis, but the analysis does have to happen offline. Right now, I along with emit…

Redirect the standard output [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 5 years ago. Improve this ques…

Linux userspace header failing to compile with g++

I have a cpp source file in which I have included the following Linux uapi header: #include <linux/netfilter_ipv4/ip_tables.h> I’m using RH6, but the header seems to be identical to the one found in the Linux kernel mainline: http://lxr.free-electrons.com/source/include/uapi/linux/netfilter_ipv4/i…