I have written code in C as follows Output as shown in ubuntu 20 OS I am expecting that child process should be written first as after fork() is called child process’s printf() will be printed on screen and after that parent’s printf() will be printed but reverse is printed actually. Please help me why child process’s printf() is not
Why is nginx access.log failing?
I try to use nginx on manjaro by typing up nginx on the terminal, but this comes up:open() “/var/log/nginx/access.log” failed (21: Is a directory). I ran sudo nginx -t and sudo systemctl start nginx.service and they both said the same thing. Is there something I can do to remedy this issue? Also to add, I used systemctl status nginx.service and
Is it possible to export a GPG private key without passphrase being provided in a prompt?
I would like to automate a GPG private key export so it runs without user interaction. I tried providing –batch –passphrase-fd 0 arguments both with passphrase being passsed as: an argument –passphrase ‘my-passhrase’ from stdin echo ‘my-passphrase’ | gpg … It didn’t work. Is it even possible to export private keys without user interaction? Answer You should add –pinentry-mode=loopback parameter,
How to go back to the Working Directory that was not committed
I forgot to commit on the directory where I was working and then I checkout to the previous commit and now I want to back to the directory where I used to work. What can i do ? Answer If your checkout of the previous version somehow deleted your folder, which was not added/committed, then you would need to rely
Bluetooth Serial Port on Raspberry Pi & something weird happened when using IDE and terminator to run python files
I am doing a project using the Bluetooth serial port. It is about the message communication between cellphones and the Rpi. I typed ‘sudo rfcomm watch hci0’ on the Terminator. The code on Python is simple: only assign the port address (‘/dev/rfcomm0’) and readline(). At first, things went right until I disconnected and reconnected. It said, “Cannot create Rfcomm TTY:
MySQL (Minecraft Java) Connection refused
i tried to access my MySQL Database with my Minecraft Server (Java) – Paper 1.16.5. But there’s this problem: I’m using Debian 10 on a KVM Root Server. This is the my.cnf file: This is the mysql.cnf: What’s the problem? Answer I fixed it by typing localhost, but my domain instead of localhost isn’t working
Json response data extraction using linux command
Below is the json response of an api endpoint, I wanted to get the id value of specific name in the below array of json response. eg: I wanted to get id value(10002) of name test3, with the help of name key. Using jq I’m able to select the name key, but I’m not to find a way to get
Cannot assign variable in for-loop in shell script
I tried to assign variable a in for-loop: But when I run, it gave error: Why did it give error? How to assign variable a? Answer There can be no spaces on both sides of the equal sign when defining variables in the Shell. It should be:
Unable to deploy NodeJS (Fastify app) in Azure App Service Linux
I’m stuck in deploying my fastify app on Azure app service linux. I’m using azure devops for pushing my code to app service. I’m using 8080 port for running my application and its works fine on my local. localhost screenshot But the same code is not working on my Azure app service linux. Below are my Azure application setting variables.
How to hold or copy files at run time in CENTOS 7
I have a tool that converts COBOL files to C++. When I run the command, it generates the.cpp file from the.cbl file but deletes it at run time. It is not holding the files or not saving the file in the designated folder, despite the fact that I can see that the.cpp file is created but destroyed within seconds. I’m