Questions tagged [process]

This tag is about operating system processes. It may also refer to a specific construct on a given platform, e.g., the System.Diagnostics.Process class for .NET

A process is an instance of a computer program being executed. Many operating systems let multiple processes run concurrently. The operating system takes care of isolating processes one from another in order to provide data integrity and also provides means for interprocess communication (IPC).

Process contains the program code and its current activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently.

A computer program is a passive collection of instructions; a process is the actual execution of those instructions. Several processes may be associated with the same program; for example, opening up several instances of the same program often means more than one process is being executed.

For security and reliability reasons most modern operating systems prevent direct communication between independent processes, providing strictly mediated and controlled inter-process communication functionality.

Resources

Process - Wikipedia

Processes and threads in Windows

What is a process in UNIX / Linux?

18168 questions
6
votes
4 answers

List with items returns empty

I have created a simple List function but if I Loop through the List it's empty. It should not be! // List function public class process_hook { public static List pro_hook = new List
User6996
  • 2,953
  • 11
  • 44
  • 66
6
votes
7 answers

In .NET what's the best way for two processes in the same machine to communicate?

What's the best (or maybe not the best -- just good) way for two processes in the same machine to communicate, using .NET? Actually the two processes in the app I'm working on aren't even two different programs; they're just two instances of the…
cruizer
  • 6,103
  • 2
  • 27
  • 34
6
votes
1 answer

Visual Studio Code, debugging child process not working

I have this exact question: https://github.com/Microsoft/vscode-cpptools/issues/511 But the solution there does not work. I've tried the same simple example code, #include #include #include int main() { pid_t…
Ch. Pla
  • 61
  • 1
  • 3
6
votes
1 answer

How to run MPI compatible applications from Jupyter notebooks?

So I have a trobule with gmsh. Direct execution works fine: !gmsh -3 -algo meshadapt tmp_0.geo -o SFM.msh While execution from code fails: try: out = subprocess.check_output( ["gmsh", "gmsh -3 -algo meshadapt tmp_0.geo -o…
DuckQueen
  • 772
  • 10
  • 62
  • 134
6
votes
2 answers

How to exit a process run with Ruby if it takes more than 5 seconds?

I'm implementing a checking system in Ruby. It runs executables with different tests. If the solution is not correct, it can take forever for it to finish with certain hard tests. That's why I want to limit the execution time to 5 seconds. I'm using…
Alex
  • 34,581
  • 26
  • 91
  • 135
6
votes
3 answers

Running a shell script using ProcessBuilder

I am trying to run a script using Java and ProcessBuilder. When I try to run, I receive the following message: error=2, No such file or directory. I dont know what I am doing wrong but here is my code (ps: I tried to execute just the script without…
Alvp
  • 73
  • 1
  • 2
  • 7
6
votes
0 answers

Killing a subtree of processes in linux bash

i am typing a small bash script which should clone a git repository, checkout a specific hardcoded branch and listen for some new commits. If new commits are found the script should kill a running instance of 'MyApp', do a git pull and finally build…
user8357485
6
votes
4 answers

QProcess::startDetached blocked by UAC (running an updater)

I have an update function in my app - it downloads and verifies the installer (a setup.exe, created with NSIS). To actually kick off the update, I have simply been doing: QString path = .. absolute path to the downloaded file…
James Turner
  • 2,425
  • 2
  • 19
  • 24
6
votes
1 answer

How to get real running process name?

In a .NET core console app, I'd like to get the running process name, I used ProcessName as the docs say, but it always returns dotnet as the process name, not the actual underline dll that is running. Although it is a dll, this is a console app,…
fluter
  • 13,238
  • 8
  • 62
  • 100
6
votes
2 answers

Can two processes render to one OpenGL canvas?

I have three different processes running on the same machine. One of them owns an OpenGL window. I would like the other two to be able to render (quickly) to different rectangular portions of the OpenGL window. If I can guarantee that they will…
Rocketmagnet
  • 5,656
  • 8
  • 36
  • 47
6
votes
2 answers

Automatically attach vs2005 debugger to a child processes

I have a main C++ app built in Visual Studio 2005, called A.exe. It spawns a child process, B.exe. I run process A in the debugger by hitting F5 -- the only way I know to hit breakpoints in process B is to wait for A to kick it off, then run Debug…
Nathan Monteleone
  • 5,430
  • 29
  • 43
6
votes
3 answers

Redirect output of child process spawned from Rust

I need to redirect output of a spawned child process. This is what I tried but it doesn't work: Command::new(cmd) .args(&["--testnet", "--fast", format!("&>> {}", log_path).as_str()]) .stdin(Stdio::piped()) …
Constantine
  • 1,802
  • 3
  • 23
  • 37
6
votes
3 answers

What is the difference between kill and kill -9?

Can anyone explain the difference between kill and kill -9. Thanks in advance.
tonyjosi
  • 717
  • 1
  • 9
  • 17
6
votes
6 answers

Spawn processes, but only 5 at a time

i'm working off a queue with filenames. Each file has to be processed by a external binary. This works fine, but it only processes one file at a time. Is it possible two spawn a number of processes parallel? Queue queue = new…
Makabra
  • 61
  • 2
6
votes
2 answers

Java exec method, how to handle streams correctly

What is the proper way to produce and consume the streams (IO) of external process from Java? As far as I know, java end input streams (process output) should be consumed in threads parallel to producing the process input due the possibly limited…
Tuomas Toivonen
  • 21,690
  • 47
  • 129
  • 225