Is the following a proper implementation of an inter-process communication? It seems to be working but I’m wondering if there could be a race condition leading to hanging. One constraint is that both processes need to be started independently and in any order. Answer Some stress tests showed no problem …
Tag: linux
How to handle 0 Content length in POST request in CGI?
In my CGI application something happens when I pass a 0 content length POST request. Here is my code: I test my application using the Http-Requester plugin for FireFox, when I pass a POST request with no data, the application seems like it enters a loop and no response. If I pass a GET request, the code works…
Pidof not finding the process
I want to find out a shell script process ID using pidof or ps command or any. All i want is only the process id of it. I have used ‘pidof -x test.sh’. Which is not working. Note: I don’t want to invoke the /bin/sh or /bin/bash – because the script will not work. If i invoke /bin/sh in…
errno after accept in Linux socket programming
As stated in accept() man page in RETURN VALUE section: Error handling Linux accept() (and accept4()) passes already-pending network errors on the new socket as an error code from accept(). This behavior differs from other BSD socket implementations. For reliable operation the application should detect the ne…
Run a perl script with the ending .pl
I have a question to perl scripts. I can write and understand C and C++ codes but have no experience in perl. I have a perl script with the extension .pl and want to run it on a Raspberry Pi Model B. I get the script (its a part of the Raspberry Pi B extension ‘Busware SD0’ Firmware) from this
When using htop command, do red values in the time+ column mean there’s something wrong?
Below is my server htop display. The nginx process uses CPU time more then 18 hours, and is shown in red color, but CPU and memory all look OK. Is the value within the normal range? Answer I was curious about this too, so I dug into the source code and found this: So, it looks like whenever the CPU
Python + pexpect – How to establish a ssh connection?
I’ve been trying to establish an ssh connection via Python + pexpect, but I can’t send the lines that I want. I think it’s certainly a syntax problem, but I don’t know where it is occurring. The problem is that the password ‘xxyyzz’ never appears on the terminal, so I think…
How do I install Node and NPM so I don’t have to use sudo?
I am trying to set up Node.js and NPM on a Ubuntu 14.04 machine but am having some trouble. On my first try I kept getting EACCES errors when trying to install packages(sometimes even with sudo), so I completely uninstalled node and npm. Now I’m trying to figure out how to install them in a way that won…
ADB on Linux Mint 17.1 doesn’t recognize Zenfone 5 with Android Kitkat 4.4.2
As described in the title, ADB v4.2.2 in Linux Mint 17.1 KDE with latest updates doesn’t recognize my Zenfone 5 A501 with Android Kitkat 4.4.2 with latest updates. When I tried: adb devices the output is always despite I plugged/unplugged. My laptop didn’t have Windows so I can’t check. Plea…
What’s the CONFIG_OF in linux?
I see that it is being widely used at many places but could not understand in what scenarios I need to use it. What is CONFIG_OF? What is the full name of “OF”? Answer Open Firmware. This was invented long time ago when Apple was producing laptops based on PowerPC CPUs and Sun Microsystems worksta…