Questions tagged [fork]
The fork tag has no usage guidance.
188
questions
0
votes
0
answers
56
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 ...
0
votes
1
answer
44
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 ...
-3
votes
1
answer
97
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?
0
votes
0
answers
70
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 ...
4
votes
0
answers
47
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 ...
0
votes
0
answers
52
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 ...
0
votes
1
answer
122
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.
...
1
vote
2
answers
2k
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 ...
1
vote
1
answer
120
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) ...
1
vote
1
answer
117
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)
{
...
0
votes
1
answer
106
views
I'm curious about the difference between running a daemon with a systemctl command and running it directly [duplicate]
I had a question while dealing with the issue related to snmp in my project.
If you enter the following command to execute snmpd with various options, snmpd will be executed without any problem.
$ ...
0
votes
0
answers
2k
views
fork: Resource temporarily unavailable - on CentOS server
I can't run anything anymore (hardly anything) and I keep getting the following error message. If I execute a command, it can be it comes several times the error fork: retry: No child processes, if I ...
17
votes
1
answer
5k
views
Double fork() - why?
I found the following function in the source code of catwm (a minimalistic window manager):
void spawn(const Arg arg) {
if(fork() == 0) {
if(fork() == 0) {
if(dis)
...
0
votes
2
answers
340
views
Fork stdin to stdout & stderr?
I am wondering if it's possible to fork standard input to stdout & stderr? Something like this,
$ echo "hi" | fork > std.out 2> std.err
$ cat std.out
hi
$ cat std.err
hi
Or, am I ...
1
vote
0
answers
47
views
Is the stack of a forked process shared with its parent? [duplicate]
Is the stack of a forked process shared with its parent?
If so, does this happen via shared copy-on-write pages?