Skip to content

Tag: linux

meaning of EPOLLERR from epoll_wait with a pipe

This is similar to the question 1 but is about pipes. If epoll_wait returns EPOLLERR for the write end of a pipe, how do I distinguish a general error condition from the read end of the pipe been closed? For the sockets case the answer was to use “use getsockopt and SO_ERROR to get the pending error&#82…

How do I find a system memory leak in linux?

I’ve got a monolithic piece of software, a game on a basic linux kernel, that seems to leak memory in swap space. The memory usage of the process itself is reported as constant over a day or so but the free memory on the system is consistently decreasing until there is no more physical ram space. There …

getuid/geteuid strange behaviour

I’ve got a simple code, which basically looks like: Which basically outputs the real and effective user id. Now, once build with: go build main.go; I also call sudo chown root:root main && sudo chmod 4755 main to get -rwsr-xr-x permissions on the file. If I understand the concept of the setuid b…

Using Sendmail from an external server

I have a server with a webapp and a mail server (who use sendmail to route mails). We need to migrate the webapp to an auto-scaling schema, so, I can’t have the mail server in there, so, I’m thinking on leaving the mail server right where it is now. So, to send mails I have different alternatives,…

Azure CosmosDB on Linux

is there a way I can run a CosmosDB emulator on a Linux machine? I need to setup a development environment for Azure Functions projects. There is a solution for storage (Azurite), I wonder I can find the same for CosmosDB. (Running a virtual machine is not an option for this case) Answer The short answer: Tod…