The getaddrinfo accepts struct addrinfo *hints as the third argument which can be used to specify the criteria for selecting socket addresses to be returned by this function. The documentation says that we could set ai_socktype as well as ai_protocol to specify our selection criteria. However, I am unable to …
Tag: linux
How to make an overlay which capture no events
I would like to draw some sort of window on top of all the other windows. For example, to display some debugging infos (like conky) or things like a timer. The main thing is that I would like to able to continue using the other windows while using it (the events go through transparently). I’ve tried doi…
Converting watch into a unit file systemd
I’ve got a shell script as follows ss.sh The requirement is that I need to use this script with the watch command. And I’d like to make this into a systemctl service. I did it as so. sc.sh And in my /etc/systemd/system, log_info.service When I run systemctl start log_info.service, It runs but not …
Error while pulling image from docker registry
I am trying to pull registry image from docker. docker run -d -p 5000:5000 –restart=always –name registry registry:2 But it gives an error like below: docker: Error while pulling image: Get https://index.docker.io/v1/repositories/library/registry/images: dial tcp 52.73.159.23:443: getsockopt: no r…
How many NUMA nodes on a Power8 processor
I am using Ubuntu 15.04 on a two sockets Power8 machine, each socket has 10 cores. “numactl -H” outputs: The problem is, are there two NUMA nodes on each Power8 processor? Any why one has memory but the other one has nothing. I can’t find any document about this. Any information would be app…
How to install mono 3 on Debian testing?
I want to compile the Unreal Engine on my Debian Liunx (testing) box, which needs the mono package libmono-corlib4.0-cil installed that depends on the mono-runtime in version 3. However, on my Debian box I have installed mono in version 4 and libmono-corlib4.5-cil (4.5 instead of 4.0). So I tried to install t…
how to alternate continously Signal handler
I want to write a program in c for linux that catchs the first SIGUSR1 signal, ignores the second one and continue in this behaviour (catch-ignore) for the successive SIGUSR1 signals. I wonder how to keep alternating between the two handlers, because once i set the handler to SIG_IGN, the signal will be ignor…
Error “undefined reference to `cprintf”” during executing make command in qemu in linux kernel
(1) This is the main function (runproctest.c): (2) defs.h: (3) console.c (4) main.c (5) Here is my Makefile: and when I enter make qemu there is a problem: I don’t know why this happens.. Answer in the makefile, this line: should be: There may be other ld commands in the make file with similar problems.…
How can I build a Linux distro? [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 6 years ago. Improve this question Disclaimer: This is my first time delving into the embedded Linux world (U…
Bash if condition doesn’t match when comparing particular string
Bash if condition doesn’t match when comparing particular string Matching string: Code: I expected this to match, but it does not. The same code works with other strings. Is this failing because of ( or ) character in the string? Answer You have variable matching reversed. You have to use * matching aro…