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
103
votes
1 answer

dump conf from running nginx process

Is it possible to get which conf the nginx is using only from a running nginx process? To get the conf file path. sometimes ps aux reveal it, sometimes it doesn't. It might be just something like nginx: master process /usr/sbin/nginx (same as…
est
  • 11,429
  • 14
  • 70
  • 118
102
votes
11 answers

How to get child process from parent process

Is it possible to get the child process id from parent process id in shell script? I have a file to execute using shell script, which leads to a new process process1 (parent process). This process1 has forked another process process2(child…
AlwaysALearner
  • 6,320
  • 15
  • 44
  • 59
101
votes
3 answers

How to get the current ProcessID?

What's the simplest way to obtain the current process ID from within your own application, using the .NET Framework?
plaureano
  • 3,139
  • 6
  • 30
  • 29
100
votes
7 answers

How to get parent process in .NET in managed way

I was looking a lot for method to get parent process in .NET, but found only P/Invoke way.
abatishchev
  • 98,240
  • 88
  • 296
  • 433
99
votes
17 answers

Uncaught ReferenceError: process is not defined

I am using node.js to create a web application. When I run the application (either by opening index.html on the browser or using the command "npm start" on the terminal) I get two errors: Uncaught ReferenceError: process is not defined …
Kantharis
  • 1,316
  • 1
  • 11
  • 21
98
votes
4 answers

How to get Command Line info for a process in PowerShell or C#

e.g: if I run notepad.exe c:\autoexec.bat, How can I get c:\autoexec.bat in Get-Process notepad in PowerShell? Or how can I get c:\autoexec.bat in Process.GetProcessesByName("notepad"); in C#?
victorwoo
  • 2,107
  • 3
  • 17
  • 20
95
votes
8 answers

Linux Process States

In Linux, what happens to the state of a process when it needs to read blocks from a disk? Is it blocked? If so, how is another process chosen to execute?
Blair
  • 3,671
  • 4
  • 29
  • 40
93
votes
5 answers

Difference between user-level and kernel-supported threads?

I've been looking through a few notes based on this topic, and although I have an understanding of threads in general, I'm not really to sure about the differences between user-level and kernel-level threads. I know that processes are basically made…
Cail Demetri
  • 2,138
  • 3
  • 22
  • 24
93
votes
7 answers

How to suspend/resume a process in Windows?

In Unix we can suspend a process execution temporarily and resume it with signals SIGSTOP and SIGCONT. How can I suspend a single-threaded process in Windows without programming ?
Michael
  • 41,026
  • 70
  • 193
  • 341
92
votes
7 answers

How to stop java process gracefully?

How do I stop a Java process gracefully in Linux and Windows? When does Runtime.getRuntime().addShutdownHook get called, and when does it not? What about finalizers, do they help here? Can I send some sort of signal to a Java process from a shell? I…
Ma99uS
  • 10,605
  • 8
  • 32
  • 42
92
votes
3 answers

Open file with associated application

i want to ask for help with opening a file from c# app with associated app. I tried this: ProcessStartInfo pi = new ProcessStartInfo(file); pi.Arguments = Path.GetFileName(file); pi.UseShellExecute = true; pi.WorkingDirectory…
Zavael
  • 2,383
  • 1
  • 32
  • 44
91
votes
6 answers

Continuously read from STDOUT of external process in Ruby

I want to run blender from the command line through a ruby script, which will then process the output given by blender line by line to update a progress bar in a GUI. It's not really important that blender is the external process whose stdout I need…
ehsanul
  • 7,737
  • 7
  • 33
  • 43
90
votes
4 answers

How to make parent wait for all child processes to finish?

I'm hoping someone could shed some light on how to make the parent wait for ALL child processes to finish before continuing after the fork. I have cleanup code which I want to run but the child processes need to have returned before this can…
Donatello
  • 947
  • 1
  • 7
  • 6
88
votes
18 answers

How to get PID of process I've just started within java program?

I've started a process with following code ProcessBuilder pb = new ProcessBuilder("cmd", "/c", "path"); try { Process p = pb.start(); } catch (IOException ex) {} Now I need to know the process's pid that I've just started.
raf
  • 1,121
  • 3
  • 13
  • 14
87
votes
8 answers

What is the best choice for .NET inter-process communication?

Should I use Named Pipes, or .NET Remoting to communicate with a running process on my machine?
mrbradleyt
  • 2,312
  • 7
  • 33
  • 38