Efficient Linux sockets (DMA/zero-copy)

There’s been some talk on linux-kernel recently about providing an API for something along these lines, but the sticking point is that you can’t DMA from general userspace buffers to the network card, because: What looks like contiguous data in the userspace linear address space is probably not-contiguous in physical memory, which is a problem … Read more

Change user id in linux

usermod will change permissions for the user’s files inside his home directory. files outside his home directory will have to be changed manually. man usermod lists the following caveats: You must make certain that the named user is not executing any processes when this command is being executed if the user’s numerical user ID, the … Read more

Limit useable host resources in Docker compose without swarm

Since many Docker Compose users have complained about this incompatibility of compose v3 vs v2, the team has developed compatibility mode. You can retain the same deploy structure that you provided and it will not be ignored, simply by adding the –compatibility flag to the docker-compose command (docker-compose –compatibility up), as explained here. I tested … Read more

How to write data to existing process’s STDIN from external process?

Your code will not work. /proc/pid/fd/0 is a link to the /dev/pts/6 file. $ echo ‘foobar’ > /dev/pts/6 $ echo ‘foobar’ > /proc/pid/fd/0 Since both the commands write to the terminal. This input goes to terminal and not to the process. It will work if stdin intially is a pipe. For example, test.py is : … Read more

Lynx with JavaScript

Lynx doesn’t support Javascript. Update 1 Based on your summary of what you’re trying to do (login to a site that requires JavaScript for the password encryption) I’d strongly recommend you look at using Selenium or another browser automation package. Even if you get the password submission working properly without such a layer, the site’s … Read more