Skip to main content
Code Review

Questions tagged [linux]

Use this tag for code that specifically targets the Linux operating system (consider [unix] for more portable code that should run on other Unix-like systems).

Filter by
Sorted by
Tagged with
11 votes
4 answers
1k views

A simple server-client application in C

I am reading "The Linux Programming Interface" by Michael Kerrisk. I'm studying about sockets, and I made a simple application using sockets on the unix domain. I want to know if I'm using ...
8 votes
1 answer
581 views

Shared-Memory Queue Implementation in C

Recently I am working on implementing a shared-memory based IPC message queue in C programming language on Linux system. A few design choices I've made include The queue will have only 1 producer, ...
3 votes
0 answers
48 views

library variant during application startup

I wrote some PoC for load library with best optimization version during application startup. The goal for it check in the _init function code checking by cpuid ...
8 votes
2 answers
463 views

Disabling local accounts on Azure Linux virtual machines

We’re enforcing Azure Entra authentication across all Linux VMs, so we’ll disable all local accounts via a custom script. The script will also create a single "break-glass" user with a randomly ...
2 votes
1 answer
205 views

CoLib - A C++ Coroutine Library in a Single Header

I've developed a coroutine library for C++ that is contained within a single header file. It is compatible with both Windows and Linux platforms. This library is not multi-threaded; instead, it is ...
Pangi's user avatar
  • 178
2 votes
1 answer
61 views

NodeJS discord bot that starts systemd services

I am writing a discord bot that can start and stop my minecraft server. It currently works, but I am still learning NodeJS and I could use some tips on how to optimize my code. Calling a command will ...
4 votes
3 answers
265 views

Calculation of consumed resources by subprocess

I've created a script that executes arbitrary user code in Python, written in a .py file, and returns execution result (contents of stdout, stderr, exec code) + ...
7 votes
3 answers
1k views

C++ code reading from a text file, storing value in int, and outputting properly rounded float

Late important updates (unified) I found, that on my Pi's Debian 12 Bookworm (arm64), there is just an older g++-12 available. ...
3 votes
1 answer
176 views

How to refactor this (sort of) getline implementation?

Goals: Create a function char *get_next_line(int fd) such as: Repeated calls (e.g., using a loop) to your get_next_line() ...
ismbks's user avatar
  • 75
5 votes
2 answers
133 views

Bash Script for Docker Image Cleanup

I’ve been working on a bash script to clean up old Docker images while keeping the latest tag for each repository and skipping images currently in use. I’m sharing the script below and would ...
Ilgar's user avatar
  • 51
3 votes
0 answers
105 views

MIDI router in Rust

I am working on a small MIDI router application for the Jack audio connection kit in Rust. The goal of the application is to route MIDI signals from an instrument to one or multiple applications in ...
5 votes
1 answer
100 views

Re-implementing head in x86-64 assembly targeting linux

I'm pretty new to x64 programming and tried to recreate parts of head for study (targeting linux). Are there any stylistic issues? The head function uses a buffer ...
1 vote
1 answer
86 views

Rust code to print shell prompt

I'm new to Rust, and this is my first successful significant Rust code. It prints a prompt(which is technically a string) to the console. I'm struggling with concepts like ...
6 votes
1 answer
191 views

Function for listing processes holding a specified file open

The function's prototype is: int processes_using(const char *name, pid_t pidlist[], int size) It searches through all processes it can to find any that have an ...
jenkins's user avatar
  • 63

15 30 50 per page
1
2 3 4 5
...
39

AltStyle によって変換されたページ (->オリジナル) /