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
87
votes
14 answers

C# - Making a Process.Start wait until the process has start-up

I need to make sure that a process is running before moving on with a method. The statement is: Process.Start("popup.exe"); Can you do a WAIT command or set a delay on this value?
Tom
  • 4,187
  • 4
  • 20
  • 10
86
votes
8 answers

How to kill a nodejs process in Linux?

tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 9631/node How do I kill this process in linux(ubuntu)?
LeBlaireau
  • 17,133
  • 33
  • 112
  • 192
85
votes
10 answers

Is there a way to change effective process name in Python?

Can I change effective process name of a Python script? I want to show a different name instead of the real name of the process when I get the system process list. In C I can set strcpy(argv[0],"othername"); But in Python argv[0] =…
Emilio
  • 3,901
  • 11
  • 44
  • 50
83
votes
1 answer

Why was the comment that said "Don't format a floppy at the same time" funny when talking about threads and processes?

I was reading up the difference between Thread and Processes and came across the comment left by users in the second answer which stated As so long as you don't format a floppy at the same time. It has 27 upvotes but no one has explained the…
Computernerd
  • 7,378
  • 18
  • 66
  • 95
79
votes
17 answers

How to add a timeout value when using Java's Runtime.exec()?

I have a method I am using to execute a command on the local host. I'd like to add a timeout parameter to the method so that if the command being called doesn't finish in a reasonable amount of time the method will return with an error code. …
James Adams
  • 8,448
  • 21
  • 89
  • 148
79
votes
8 answers

Killing a process using Java

I would like to know how to "kill" a process that has started up. I am aware of the Process API, but I am not sure, If I can use that to "kill" an already running process, such as firefox.exe etc. If the Process API can be used, can you please point…
Jeel Shah
  • 3,274
  • 17
  • 47
  • 68
78
votes
3 answers

How to pipe multiple commands into a single command in the shell? (sh, bash, ...)

How can I pipe the stdout of multiple commands to a single command? Example 1: combine and sort the output of all three echo commands: echo zzz; echo aaa; echo kkk desired output: aaa kkk zzz Example 2: rewrite the following so that all the…
Rob Bednark
  • 25,981
  • 23
  • 80
  • 125
77
votes
12 answers

Run process with realtime output in PHP

I am trying to run a process on a web page that will return its output in realtime. For example if I run 'ping' process it should update my page every time it returns a new line (right now, when I use exec(command, output) I am forced to use -c…
Maksim Vi.
  • 9,107
  • 12
  • 59
  • 85
77
votes
1 answer

Htop showing multiple java processes with different pids

Htop on my linux machine shows many "processes" after launching one java program/JVM. I do understand that the JVM runs multiple threads (for the actual program, for garbage collection, etc). But how come htop lists them as multiple processes with…
b.buchhold
  • 3,837
  • 2
  • 24
  • 33
76
votes
4 answers

How does Ctrl-C terminate a child process?

I am trying to understand how CTRL+C terminates a child but not a parent process. I see this behavior in some script shells like bash where you can start some long-running process and then terminate it by entering CTRL-C and the control returns to…
vitaut
  • 49,672
  • 25
  • 199
  • 336
75
votes
11 answers

How to Daemonize a Java Program?

I have a Java program that I'd like to daemonize on a linux system. In other words, I want to start running it in a shell and have it continue running after I've logged out. I also want to be able to stop the program cleanly. I found this article…
Rich Apodaca
  • 28,316
  • 16
  • 103
  • 129
75
votes
13 answers

C++, How to determine if a Windows Process is running?

This is concerning Windows XP processes. I have a process running, let's call it Process1. Process1 creates a new process, Process2, and saves its id. Now, at some point Process1 wants Process2 to do something, so it first needs to make sure that…
Pedro
  • 759
  • 1
  • 5
  • 3
75
votes
5 answers

What are the differences between kill process and close process?

When I start a process and want to close this process, what are the differences between Process.Close() and Process.Kill()? I asked because I have an application which starts to capture packet using Wireshark with a command via command line with…
user1710944
  • 1,419
  • 4
  • 16
  • 17
73
votes
3 answers

.NET - WindowStyle = hidden vs. CreateNoWindow = true?

When I start a new process, what difference does it make if I use the WindowStyle = Hidden or the CreateNoWindow = true property of the ProcessStartInfo class?
Gabor
  • 1,656
  • 1
  • 16
  • 28
72
votes
8 answers

Start script after another one (already running) finishes

So I have a process running, and it will take several hours to complete. I would like to start another process right after that one finishes, automatically. Notice that I can't add a call to the second script in the first one, neither create another…
skd
  • 1,865
  • 1
  • 21
  • 29