Skip to content

Tag: c++

How to interact between webpage and an actual program

What I have: A program (c++) on a server (linux) The program can be executed with command line parameters The program finishes after a while and produces continously output (“log.txt”) What I want: My idea is to have some kind of user interaction with that program: The user opens a website which s…

C: finding longest line

I am trying to run this example from (dennis ritchie book), however it does not find the longest line, any idea? main.c other.c other.h Using debugger: looks like i in copyL function does not increment… any ideas why? FIX: Answer I think you incorrectly transcribed the code. This line: is probably incor…

Can socket send fail cause a daemon program crash?

I have two applications running on Embedded Linux board. One runs as a daemon and other acts as an interface for it. They communicate with each other using Unix sockets. As to handle any abnormal termination of socket, I tried terminating the interface application [ctr+c]. But as a result, the daemon applicat…

What is the integer value of AF_UNIX?

So, I’m trying to write some JNA code to work with Unix sockets, and I’m trying to reference AF_UNIX for sockets. I looked through some of the gcc included files, but I couldn’t find anything. Answer On my Ubuntu-machine it is defined in /usr/include/x86_64-linux-gnu/bits/socket.h as 1. I ha…