227,524 questions
Advice
0
votes
2
replies
27
views
can I use dup2() to send output to stdout instead of a Unix Domain Socket?
It's seems easy to find examples of using dup2() to cause output (originally) intended for stdout to instead go to a socket:
char *stdoutMsg = "This message will be sent to stdout\n";
write(...
-4
votes
0
answers
41
views
After executing `pip install` on my EC2 server, other networks on the EC2 were blocked [closed]
I'm using an EC2, t3.micro, Amazon Linux server.
I'm running a web server on this server, and it's exposed to the outside world.
Then I connected to the server via my local iTerm and run `python3 -m ...
3
votes
2
answers
100
views
Question about retry logic in usb-skeleton.c skel_read()
I'm a computer science undergraduate student studying Linux kernel USB device drivers.
While analyzing the skel_read() function in usb-skeleton.c, I noticed what seems like inconsistent retry logic. I'...
-3
votes
0
answers
70
views
How to create a modal window that stays on top of another window? [closed]
When I build my Python app with PySide6, I can declare a second window as a modal (on top of others).
On Windows, it works just as I wanted.
However, on Linux, users can click behind a window, and ...
0
votes
0
answers
67
views
`btvirt` (virtualized BlueTooth) with TrouBLE [closed]
Desired behavior
Have the central make a connection with the peripheral.
The "trouBLE" I run in to
The central code returns directly a BleHost(Timeout) error, even with adjusted settings
I'...
3
votes
1
answer
111
views
Java shell pipeline: `head` command doesn't output lines until it receives the expected number, even with `tail -f`
I'm building a shell in Java and currently implementing pipeline logic. For inter-process communication, I've created this class:
public class PipeConnector implements Runnable {
private final ...
-2
votes
0
answers
55
views
How to make sure that server is always available (at least to do SSH) under high CPU and mem usage? [closed]
I want to reserve some CPU and mem for SSH in case of high CPU and mem usage, so that I can go inside the server troubleshoot and kill the process consuming most resources.
I have used the below to ...
Best practices
0
votes
2
replies
121
views
Can Linux kernel software mechanisms track the sequence of accessed memory pages, or is hardware support required?
I want to generate a memory access trace in Linux where every fixed number of memory accesses (e.g., every 32 accesses) are grouped and recorded as one batch. Is it possible to implement this kind of “...
3
votes
1
answer
89
views
Unexpectedly poor performance of io_uring for multiple TCP socket writes
I am looking for some guidance on using io_uring for high-fan-out TCP writes.
I have a Rust application that waits for an event in a tight loop. Whenever the event occurs, the same payload needs to be ...
-2
votes
0
answers
62
views
Custom kickstart installation in Oracle Linux 9 [closed]
In Oracle Linux 8 (and earlier versions), I usually made some automated installations with kickstart scripting.
In version 8, it was the easiest, because I would just mount DVD ISO and copy all files ...
Best practices
1
vote
0
replies
35
views
Test a kernel driver in QEMU
How should I test a Linux kernel driver, without a real device. It is not a device that QEMU supports(in my case, it's drivers/tty/serial/digicolor-usart.c).
Gemini told me I can modify the source ...
1
vote
1
answer
40
views
how to edit vlan-id of a sub-interface directly in linux? [closed]
I want to change vlan-id directly and I don't want to delete and recreate sub-interface with new vlan-id.
7
votes
1
answer
177
views
Reproducing buffer overflow
Trying to reproduce buffer overflow on Ubuntu 24 for learning purposes.
So the goal is to call call_me_twice second time by passing its address into input string.
$ cat bof.c
#include <stdio.h>
...
Advice
0
votes
1
replies
48
views
How does the version of Bluez correspond to the version of the Bluetooth specification?
Recently, I have just started to get acquainted with the bluez protocol stack. I would like to know how the version of bluez corresponds to the official Bluetooth specification version. For instance, ...
Best practices
0
votes
3
replies
88
views
Linux embedded system : poweroff best practices
I’m working on an embedded Linux system built with Buildroot, using BusyBox init on an x86 board
# /etc/inittab
#
# Copyright (C) 2001 Erik Andersen <[email protected]>
#
# Note: BusyBox ...