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

How to retrieve working directory of running process in Java?

Original post the one that most people were answering Here is the code I have already tried doing this with String workingDirectory = "/home"; String command = "cd ../"; ProcessBuilder pb = new ProcessBuilder(new String[] { "cmd", "/c", command…
user5473961
6
votes
1 answer

Sending a signal to a Process from Java 9

I hear in java 9 they did a lot of work updating the Process API. Is there now a cleaner way to send a signal to a Process spawned by Java? The signals are used as a simple way to trigger actions in the process. Before I had to use reflection to get…
flakes
  • 21,558
  • 8
  • 41
  • 88
6
votes
2 answers

Gracefully terminate a command line application on Windows

I'm creating a command-line application, which spawns a process (command defined by a user, usually an HTTP server) and when the application's job is done, I want to let the process know it should terminate. In UNIX, I can do that by sending SIGTERM…
Honza Javorek
  • 8,566
  • 8
  • 47
  • 66
6
votes
1 answer

Can someone explain ActivityManager: Start proc 27854 (class)/u0a66 for service?

Can someone please explain what is: ActivityManager? 27854? u0a66?
Red M
  • 2,609
  • 3
  • 30
  • 50
6
votes
1 answer

Signalling to a parent process that a child process is fully initialised

I'm launching a child process that exposes a WCF endpoint. How can I signal from the child process to the parent process that the child is fully initialised and that it can now access the endpoint? I'd thought about using Semaphores for this…
chillitom
  • 24,888
  • 17
  • 83
  • 118
6
votes
1 answer

mmap File-backed mapping vs Anonymous mapping in Linux

what is the main difference between File-backed mapping & Anonymous mapping. How can we choose between File-backed mapping or Anonymous mapping, when we need an IPC between processes. What is the advantage,disadvantage of using these.?
user1762571
  • 1,888
  • 7
  • 28
  • 47
6
votes
1 answer

When your BroadcastReceiver is invoked via an Intent, what process does it run on?

I know that we have 10 seconds to handle an intent; otherwise, watch dog timer will kick in. And its suppose be a light-weight function. So my question is, does the BroadcastReceiver run in the same process as your root activity? Or does it run…
Takeshi Kaga
  • 48
  • 2
  • 15
6
votes
2 answers

launch process with fork and exec while redirecting stdout to /dev/null

I have a very specific problem for which I am unable to find the answer after numerous searches. I have a linux program. It's job is to launch another secondary executable (via fork() and exec()) when it receives a specific message over the…
mdevico
  • 71
  • 1
  • 4
6
votes
1 answer

How can I call a subprocess in Idris?

Is there some module in the Idris standard library (or a third party library) that allows one to shell out to another program? I'm thinking of modules like Python's subprocess and Haskell's System.Process. Ideally, I'd like to interact…
Langston
  • 1,083
  • 10
  • 26
6
votes
1 answer

Programmatically getting list of child processes of a given PID

I'd like to get a list of all the immediate children of a given PID. I'm OK with using /proc but /proc//task//children is NOT precise and may return inaccurate results (see section 3.7 here). I'd like a more reliable method of doing this.…
Coder
  • 597
  • 7
  • 22
6
votes
1 answer

Question about zombie processess and threads

i had these questions in my mind since i was reading some new topics on processes and threads. I would be glad if somebody could help me out. 1) What happens if a thread is marked uncancelable, and then the process is killed inside of the critical…
Amir Zadeh
  • 3,481
  • 2
  • 26
  • 47
6
votes
3 answers

Sending SIGSTOP to a child process stops all execution. C

When I call kill(Child_PID, SIGSTOP); from the parent, I expect the child to halt execution and the parent to continue. Is that the expected behavior or do I have to explicitly declare the SIGSTOP handler in the child? I have searched everywhere…
Braden
  • 1,548
  • 2
  • 12
  • 20
6
votes
3 answers

How to redirect process output to System.String

I am calling Java process from .NET application and I need to redirect console output to System.String to do some later parsing. Please advice. I would appreciate short code example. public bool RunJava(string fileName) { try { …
Captain Comic
  • 15,744
  • 43
  • 110
  • 148
6
votes
3 answers

.NET Processing spawning issues

I have an executable that runs instantly from a command prompt, but does not appear to ever return when spawned using System.Diagnostics.Process: Basicly, I'm writing a .NET library wrapper around the Accurev CLI interface, so each method call…
FlySwat
  • 172,459
  • 74
  • 246
  • 311
6
votes
1 answer

How can i terminate myself if i run too long?

I have a application that runs periodically (it's a scheduled task). The task is launched once a minute, and normally only takes a few seconds to do its business, then exits. But there's a ~1 in 80,000 chance (every two or three months) that the…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219