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
139
votes
15 answers

How to check if there exists a process with a given pid in Python?

Is there a way to check to see if a pid corresponds to a valid process? I'm getting a pid from a different source other than from os.getpid() and I need to check to see if a process with that pid doesn't exist on the machine. I need it to be…
Evan Fosmark
  • 98,895
  • 36
  • 105
  • 117
135
votes
13 answers

Kill a Process by Looking up the Port being used by it from a .BAT

In Windows what can look for port 8080 and try to kill the process it is using through a .BAT file?
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
130
votes
20 answers

w3wp process not found

I use Visual Studio 2010 to debug a asp.net MVC project in my local machine. The steps are: Click Debug and try to attch process "w3wp.exe". However it is not in the list. I am sure "Show processes in all sessions" is clicked.
user1108948
129
votes
21 answers

Check to see if python script is running

I have a python daemon running as a part of my web app/ How can I quickly check (using python) if my daemon is running and, if not, launch it? I want to do it that way to fix any crashes of the daemon, and so the script does not have to be run…
Josh Hunt
  • 14,225
  • 26
  • 79
  • 98
128
votes
4 answers

Hide console window from Process.Start C#

I am trying to create process on a remote machine using using System.Diagnostics.Process class. I am able to create a process. But the problem is, creating a service is take a long time and console window is displayed. Another annoying thing is the…
Prasad
  • 1,847
  • 5
  • 21
  • 26
126
votes
17 answers

Kill process by name?

I'm trying to kill a process (specifically iChat). On the command line, I use these commands: ps -A | grep iChat Then: kill -9 PID However, I'm not exactly sure how to translate these commands over to Python.
Aaron
  • 2,672
  • 10
  • 28
  • 45
118
votes
7 answers

Shell script read missing last line

I have an ... odd issue with a bash shell script that I was hoping to get some insight on. My team is working on a script that iterates through lines in a file and checks for content in each one. We had a bug where, when run via the automated…
RHSeeger
  • 16,034
  • 7
  • 51
  • 41
116
votes
8 answers

How do I attach Visual Studio to a process that is not started yet?

I have .NET program that can't be run from Visual Studio for some reasons (Excel file created from an Excel 2010 template project) for which I need to debug startup events. If I want to debug events that comes after program initialisation there is…
Ucodia
  • 7,410
  • 11
  • 47
  • 81
111
votes
7 answers

How to determine programmatically whether a particular process is 32-bit or 64-bit

How can my C# application check whether a particular application/process (note: not the current process) is running in 32-bit or 64-bit mode? For example, I might want to query a particular process by name, i.e, 'abc.exe', or based on the process…
satya
  • 2,537
  • 9
  • 33
  • 43
110
votes
15 answers

Linux/Unix command to determine if process is running?

I need a platform independent (Linux/Unix|OSX) shell/bash command that will determine if a specific process is running. e.g. mysqld, httpd... What is the simplest way/command to do this?
Highway of Life
  • 22,803
  • 16
  • 52
  • 80
109
votes
14 answers

How to get a list of current open windows/process with Java?

Does any one know how do I get the current open windows or process of a local machine using Java? What I'm trying to do is: list the current open task, windows or process open, like in Windows Taskmanager, but using a multi-platform approach -…
ramayac
  • 5,173
  • 10
  • 50
  • 58
108
votes
2 answers

Use and meaning of session and process group in Unix?

Unix processes have a session id and are part of a process group - which can be changed/queried with functions such as setsid()/getpgrp(). However the concept of a process group and session always eluded me, could anybody explain what significance…
Habalusa
  • 1,770
  • 3
  • 15
  • 15
106
votes
4 answers

What is the difference between fork and thread?

Can anyone explain the difference between a fork and a thread?
Pavunkumar
  • 5,147
  • 14
  • 43
  • 69
105
votes
4 answers

Argument passing strategy - environment variables vs. command line

Most of the applications we developers write need to be externally parametrized at startup. We pass file paths, pipe names, TCP/IP addresses etc. So far I've been using command line to pass these to the appplication being launched. I had to parse…
104
votes
8 answers

Is there one JVM per Java application?

Is the same JVM used by all Java applications running or, does 'one JVM per Java application' apply? (say the applications are IntelliJ IDEA, a server and NetBeans for example) Further, is there any connection between JVMs assigned and processes…
nadh
  • 1,211
  • 3
  • 11
  • 6