Skip to main content

Questions tagged [fork]

8 votes
1 answer
1k views

How to stop kate forking itself

After a recent update, kate seems to fork a copy of itself, presumably with some parameter which prevents an endless recursion, and then exits. Presumably this was intended to help users who run kate ...
Richard Parkins's user avatar
0 votes
1 answer
71 views

flock not working between forks on the same fd

I am working on a process that forks several times. To debug it, I am using a debug file for which I open a fd and which stays the same for all child forks. Then I have a function print_debug, that ...
Bastian's user avatar
  • 25
8 votes
2 answers
638 views

fork() Causes DMA Buffer in Physical Memory to Retain Stale Data on Subsequent Writes

I'm working on a C++ application on Ubuntu 20.04 that uses PCIe DMA to transfer data from a user-space buffer to hardware. The buffer is mapped to a fixed 1K physical memory region via a custom ...
Nungesser Mcmindes's user avatar
0 votes
0 answers
100 views

GDB doesn't hit catchpoint on the child process forked off from debuggee

I was re-doing what described here about multiprocessing debugging in GDB. The weird thing is that GDB doesn't hit the exec catchpoint on the child process running cat command (the latter is forked ...
CarloC's user avatar
  • 385
0 votes
1 answer
61 views

Are reads of /proc/pid/environ atomic in Linux 6.x (e.g: 6.1.99)?

When a process execs, looking at kernel code for environ_read(), it seems that if the mm_struct doesn't yet exist / is null or the env_end member of that mm_struct is null, environ_read() will return ...
Gregg Leventhal's user avatar
0 votes
0 answers
87 views

Understanding AFL behaviour for fork and execv; Why `/proc/<pid>/maps` does not show the loaded binary

TL;DR Why process map in /proc/<pid>/maps does not show where the executed binary is loaded? I am trying to do some post-mortem analysis of the fuzzed program once it finishes. Basically what I ...
sorin the turtle's user avatar
0 votes
1 answer
58 views

What Causes PHP Forks to Consolidate on a Single CPU Core in FreeBSD 13.3?

I'm using a PHP 8.x script to process a series of images, performing various conversions and resizing tasks. To make the most of the server's multiple cores, I employ the pcntl_fork() function to ...
Adam Ellis's user avatar
-3 votes
1 answer
147 views

why don't we create processes from scratch and make it a "fork", in linux? [duplicate]

why in Linux do we not create a process from scratch, as "init" is created, but create a "fork" of it by the method of branching?
 Шмига Дарина's user avatar
0 votes
0 answers
163 views

fork() is very slow

I have a Linux server running Ubuntu 18.04 on a VM. Executing any task like ls -l or w frequently takes several seconds to finish. strace -c ls -l says ls only takes a few milliseconds, but running ...
Call of Guitar's user avatar
4 votes
0 answers
69 views

Perl's `kill` is using `$! == Errno::EINTR` unexpectedly

I wrote a network daemon that forks off children to handle TCP connections. On SIGINT the main process triggers a kill for each child in order to clean up and to collect some final statistics. In ...
U. Windl's user avatar
  • 1,771
0 votes
0 answers
54 views

Forking from a systemd service [duplicate]

I have a python program that runs as a systemd user service. From that program, I launch external commands via subprocess.Popen(cmd, close_fds=True, start_new_session=True). My intention is for these ...
czert's user avatar
  • 1
0 votes
1 answer
225 views

What's the difference between "-dm" and "-Dm" in GNU Screen?

The GNU Screen manual says: `-d -m' Start `screen' in _detached mode. This creates a new session but doesn't attach to it. This is useful for system startup scripts. ...
Sebastian Carlos's user avatar
2 votes
2 answers
4k views

What is the "correct" way to run a systemd service which spawns long running detached processes?

I have a systemd service which spawns an ffmpeg process any time it detects a new event. These processes are meant to survive and run to completion even if the service is restarted (hence them being ...
plunker's user avatar
  • 87
1 vote
1 answer
189 views

Child and sibling processes from running tmux in zsh

I am using Ubuntu 22.04.1 on WSL 2 (though the fact that it is Unix is only relevant for this question) How come when we run tmux from a zsh session, the process tree (which I have abridged somewhat) ...
Abced Decba's user avatar
1 vote
1 answer
221 views

What is the easiest way to run a VM that executes a simple C program

I'm trying to run a simple one file C program in a Virtual Machine. In fact it is the fork bomb c program: #include <stdio.h> #include <sys/types.h> int main() { while(1) { ...
someone12321's user avatar

15 30 50 per page
1
2 3 4 5
13