python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
What is fork() doing here?
So I am trying to figure out what this code is doing:
int k = 5;
if(fork() == fork()) ++k; else --k;
printf("%d\n", k);
The thing that bothers me is that I receive different outputs:
4
4
...
Jorj2014
Votes: 0
Answers: 2
netstat gives 1 as PID for all ssh connections
In my custom linux image using netstat 1.42 (2001-04-15) from the package net-tools 1.60 I am seeing different behaviors for different linux versions..
On Linux 5.4.28:
# netstat -tnp | grep ESTABLISH...

lucifer
Votes: 0
Answers: 0
How to emulate USB-device as "alive" on VM?
Step by step:
My PC has connected printer via USB (I know VID:XXXX and PID:YYYY)
I took image of my PC and put inside virtual machine (VMWare)
Of course image on my VM doesn't has connected USB-print...
DQuade
Votes: 0
Answers: 1
A program in C language (linux) which does the same thing as the nice -n [number] [process]
I need to write a C program that launches another program with a modified priority, much as as the nice command does. In order to do that, I would like to find the PID of a process given as an argume...
Tudor Octavian
Votes: 0
Answers: 1