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
2 answers

Process spawned through Process.Start in .NET hangs the thread

Our application has a background thread which spawns a process through System.Diagnostics.Process: Process.Start( new ProcessStartInfo { FileName = url, UseShellExecute = true } ); This used to have no issues at all. …
Jacob
  • 77,566
  • 24
  • 149
  • 228
6
votes
4 answers

Process.kill() denied in Windows 7 32bits even with Administrator privileges

Hello every one. I'm faced with a weird problem. My application has a simple method that in case IE enters a state were it gets unresponsive this method is fired closing all IE process's and then the application restarts its work with IE. Method…
Fábio Antunes
  • 16,984
  • 18
  • 75
  • 96
6
votes
1 answer

Qt5: Preventing another instance of the application doesn't work anymore...!

I am using Qt5 on a Windows7 platform. My application is some kind of TCP server listening on port 8002, so I only want one instance of it. In order to prevent multiple instances of my application, I use(d) the code below (found here on…
סטנלי גרונן
  • 2,917
  • 23
  • 46
  • 68
6
votes
2 answers

Access denied while getting process path

I am trying to get process path by pid but I'm getting Win32Exception (access id denied). The code looks like this: string path = Process.GetProcessById(pid).MainModule.FileName I have tried using OpenProcess with GetModuleFileNameEx but…
Giorgi
  • 30,270
  • 13
  • 89
  • 125
6
votes
1 answer

List of all running processes in Contiki OS

is there a possibility to list all running processes in contiki os and output the result on the debugging output (i.e. UART) ?
ralf htp
  • 9,149
  • 4
  • 22
  • 34
6
votes
2 answers

How to stop bash from creating subshells when recursively call a function

This is a simple shell function to calculate factorial. #!/bin/bash function factorial() { if (( $1 < 2 )) then echo 1 else echo $(( $1 * $(factorial $(( $1 - 1 ))) )) fi } factorial $1 But I find that this script will…
TorosFanny
  • 1,702
  • 1
  • 16
  • 25
6
votes
2 answers

How do you kill a process and its children on a timeout in Go code?

I have a situation where I need to kill a process after some time. I start the process and then: case <-time.After(timeout): if err := cmd.Process.Kill(); err != nil { return 0, fmt.Errorf("Failed to kill process: %v", err) …
Varun
  • 1,013
  • 3
  • 17
  • 28
6
votes
5 answers

How to approach a new project

Many a time I get lost in the middle of a project, and the project gets delayed. I have four projects which are still not completed, and new projects are coming. How should I approach a new project? Are there any books or websites that help…
Moksha
  • 1,030
  • 6
  • 17
  • 38
6
votes
2 answers

Change real process name in C on Linux

I'm currently trying to change the process name of a process so I can read the more easily with htop, top, .... I want to LD_PRELOAD this code into another process so it gets renamed by an environemt variable. I found a lot of stuff in the internet,…
das_j
  • 4,444
  • 5
  • 31
  • 47
6
votes
1 answer

How to open a command line window in Node.js?

How to open a new command line window and execute a bash command which runs in a separate independent process? I tried var child_process = require('child_process'); child_process.execSync("cmd.exe /K node my-new-script.js parm1 parm2); but it…
Stephan Ahlf
  • 3,310
  • 5
  • 39
  • 68
6
votes
3 answers

Linux: can I read the output of another process without using any IPC (pipes, etc.)?

Is it possible in linux to somehow read the output (from stdout and stderr) of another process without it knowing about it? So lets say I have a process A running in the background and process B wants to read its output - is it possible? I can't use…
zbigh
  • 457
  • 2
  • 9
  • 16
6
votes
2 answers

Redirection with Runtime.getRuntime().exec() doesn't work

I need to execute a command from a program. The command line is ok, I tried it in the terminal, but it doesn't work in the program. I add a copy from my code: File dir = new File("videos"); String[] children = dir.list(); if (children ==…
Blanca Hdez
  • 3,513
  • 19
  • 71
  • 93
6
votes
4 answers

How to send function keypress (F1..F12) to a console app in .NET

I am writing a windowed .NET app in C#, which runs a third party console application via the Process class, as hidden as possible (CreateNoWindow, RedirectStandardOutput, etc.). I've redirected it's StandardInput, so I can write whatever string I…
ifroz
  • 103
  • 3
  • 6
6
votes
1 answer

How do I run processes synchronously, targeting the same output?

I have a .Net application that needs to run several executables. I'm using the Process class, but Process.Start doesn't block. I need the first process to finish before the second runs. How can I do this? Also, I'd like all of the processes to all…
Mike Pateras
  • 14,715
  • 30
  • 97
  • 137
6
votes
4 answers

Lua: how to check whether a process is running

I would like to start a process from Lua and monitor whether the process is still running. [EDIT] I know starting can be achieved by os:execute, but this is blocking. I would like to find a way to start a process non-blocking and monitor whether it…
Ben
  • 1,519
  • 23
  • 39
1 2 3
99
100