FAQ Database Discussion Community


Process.Kill() doesn't seem to kill the process

c#,.net,process,kill
I am having trouble using Process.Kill(). I think I must be misunderstanding how it works. This is my test function. I start a long-running process (ping -t) and then kill it five seconds later. I can see the ping process show up, but the process is still there after my...

How can I automate none-PATH plink (Putty Link) on windows? and get its output?

powershell,process,plink,redirectstandardoutput
I have been trying both standard PS1 using what I read about using: ECHO y | plink ..... But the issue I have is that plink is being saved on a network drive. I can call it using: $plink = "P:\path\plink.exe" echo y | &$plink -ssh -l user-pw password $addrss...

How do I know the last sched time of a process

linux,process,linux-kernel,scheduling
I current run into an issue that a process seems stuck somehow, it just doesn't gets scheduled, the status is always 'S'. I have monitored sched_switch_task trace by debugfs for a while, didn't see the process get scheduled. So I would like to know when is that last time scheduled...

Parent and child process control

c,process
I'm not sure about the title so please correct it if you know a better one. I'm doing a simple "server" program in C and I'm using a child process just to read "exit" and close the "server" without blocking the main process. How can I use the exit signal...

Calling a non exe (Labview VI) external program into Java

java,process,runtime,inputstream,labview
I have developed a Labview program and i want Java to trigger it open, i have seen many methods to run external exe applications in Java, is it possible to call an non-exe file with the labview file format .vi?

bash: test if a process is running with a certain option

bash,process,option
I would to know if it's possible to detect if amarok is playing music or not, in bash. I have tested #! /bin/bash if [ "$(pidof amarok --play)" ] then echo amarok is playing music! else echo amarok is not playing! fi But I have this error: pidof: invalid options...

GetModuleFileNameEx - Split output

c++,process
I trying to get process name from the process id, and I've use GetModuleFileNameEx and I write this function. char* ProcessName(ULONG_PTR ProcessId) { char szBuffer[MAX_PATH+1]; HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ | PROCESS_TERMINATE, FALSE, ProcessId); if(GetModuleFileNameEx(hProcess, NULL, szBuffer, MAX_PATH) == 0) sprintf(szBuffer, "null"); CloseHandle(hProcess); return szBuffer; } the output is...

How to use PowerShell get the start up account of a process?

security,powershell,authentication,process,runas
On windows, I can use runas to run an application as another account (not the one your are logged in at the moment) like this: runas /netonly /user:some_domain\account "utility.exe" How can I get this some_domain\account from PowerShell? I've checked Get-Process and win32_process WMI class but didn't find anything useful. Update...

Why node server.listen do not returns to shell

node.js,process,server
Node files can describe from servers to simple scripts, even something that only prints to console: //logger.js console.log('Hello World'); // in the terminal > node logger.js Hello World > How http package (and others) do not give the command prompt back to the user; how do they keep the process...

Starting java desktop app from headless mode

java,process,awt,headless
I have created a java process that runs headless in the background that monitors mac machines. Part of the monitoring includes taking screenshots of the user's action and occasionally bringing up a chat window. I am under the assumption that none of these actions can be performed from headless mode,...

How to get return value from a forked / spawned process in Ruby?

ruby,process,output,fork,spawn
My simple test program: pid = Process.spawn("sleep 10;date") How can I place the output (eg stdout) of the "date" command in a variable when it is available? I don't want to use a file for the data exchange....

JAVA Concurrent stdInput and stdError with process.exec

java,multithreading,process
I am trying to read the stdInput and stdError from a process while the process is running. I created a thread to run the process, and that works. In the constructor for the I pass a reference to a Process that is created so I can watch the output from...

BufferedReader seems to infinitely read the first line

java,process,bufferedreader,handbrake
I'm trying to run Handbrake through a Java app I'm writing, and am having trouble waiting for Handbrake to finish. When I try this : ProcessBuilder builder = new ProcessBuilder( "cmd.exe", "/c", command); Process p = builder.start(); BufferedReader inputreader = new BufferedReader(new InputStreamReader(p.getInputStream())); String line = null; while((line = inputreader.readLine())...

waitpid for child process not succeeding

c,linux,process,pthreads,waitpid
I am starting a process using execv and letting it write to a file. I start a thread simultaneously that monitors the file so that it's size does not exceed a certain limit using stat.st_size. Now, when the limit is hit, I waitpid for the child process, but this throws...

how to execute a terminal command in c#

c#,bash,process
I read many post, from them there is this one c# - Opening the terminal process and pass commands? I do the exact same thing in my code Process process = new System.Diagnostics.Process (); Process proc = new System.Diagnostics.Process (); proc.StartInfo.FileName = "/bin/bash"; proc.StartInfo.Arguments = "-c \" " + command...

How to get whole list of processes in decreasing order of their thread count ( C# ) [duplicate]

c#,.net,multithreading,process
This question already has an answer here: How to count the amount of concurrent threads in .NET application? 2 answers How to get whole list of processes in decreasing order of their thread count ( C# )...

How to monitor the process in a container?

process,linux-kernel,cgroups,linux-containers
I currently look into the LXC container API. I am trying to figure out how can I make the operating system know to which container the currently running process belongs. In this way, OS can allocate resource for processes according to the container.

Return From process

c#,process
I have a c# program that will call another c# program using Process.start() that I also have the source code. How I can return a string for example from the second program that it can be read by the caller program. Thanks...

How to process data in a form using php without submitting it

php,forms,process
When I enter a video ID and the length of loan and then hit button FindDetails my form will show the name of the video, it's price to hire and the total cost of hire. This causes two problems: Submitting the form wipes video ID and the length of loan....

Run exe file while it is still open in C#

c#,file,process,shared
Currently I do the following: Include an EXE file in resource file. in runtime I extract EXE file and write it to a file on HDD, with "DeleteOnClose" option. Obviously II do not close the file so it remains on Disk. I go to path and double click it ,...

Behavioral into FlipFlop Structural

process,vhdl,behavior,flip-flop
In this code, when reset equals 1 the s becomes 1000 and when reset equals 0 the s becomes 0100 then 0010 then 0001 and it starts all over again with 1000 as the start value, only if the clock is up. library IEEE; use IEEE.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity clock_behav...

Bound wait to solve race condition

algorithm,process,operating-system,synchronization,race-condition
I am trying to Give a race condition example , then write an algorithm to impose synchronization and write an algorithm that implement the Bounded wait solution?! I tried the case of when two admins A and B in the school receive 2 students to register them if they hit...

Check if process indirectly resulted in an error

c#,sql-server,process,cmd
I have the following code that I'm using to open cmd and run the SQL Server setup.exe with a configuration file. ProcessStartInfo pStartInfo = new ProcessStartInfo(); pStartInfo.FileName = "cmd.exe"; pStartInfo.Arguments = "/c /q setup.exe /c /q /configurationFile=../configurationFile.ini"; pStartInfo.WorkingDirectory = installDir + @"\SQL Server Unpacked"; pStartInfo.CreateNoWindow = true; pStartInfo.WindowStyle = ProcessWindowStyle.Hidden;...

Get a process path with VBS

vbscript,process
I want to kill a process with vbs, i know the command is : oShell.Run "taskkill /im software.exe", , True how to get software.exe path before we kill it ? Because i want to launch software.exe again....

Share info between two processes - what's the safest way?

android,process,sharedpreferences,android-broadcast
I have an app with two processes - the MainActivity and a background Service. I need the same information in both, and this info comes from my server (a JSON response). I was loading this JSON from both processes, but as this JSON may get bigger it's pretty inefficient to...

Java: Multiple process execution, executes in different amounts each time

java,c++,process
I was building GUI around some simple C++ program, and it tourned out I can execute it only once. I want to be able to run it every time i click on button, but it tourns out it won't let me. I simplified the case to folowing code: import java.io.InputStream;...

Cached Process.Threads instead of live value

c#,multithreading,process
I'm having trouble accessing Threads of a Process-Object. It seems like System.Diagnostics.Process.Threads is a cached array instead of being read upon access. This means, that retrieving the Process of another application, storing it during the lifecycle of your application and accessing its Threads periodically will not yield the expected output....

Process.RedirectStandardOutput does not work

c#,process,output
I have a problem redirecting standard output of an application. It seems like this is some kind of bug in .NET. I'm running Live555ProxyServer but I don't get any output even when console which starts does have a written output. This code works with any other console application but not...

Scala Process for Linux is stuck

scala,unix,process,cat
I'm trying to use Scala Process in order to concate two files and send the result to a new file. The code works fine, but when i remove the permissions to the folder, it seems to be stuck. Here is the code: val copyCommand = Seq("bash", "-c", "cat \"" +...

Bash - how to write the output of a command into a varable and also get the commands pid

bash,shell,process
I need to get the full output of a command and also get its pid. The problem is that getting the pid works like this: (nmcli d wifi connect "$1" password "$2") & PID=$! and grabbing the output works like this: output="$(nmcli d wifi connect $1 password $2)" How do...

Application of sed command several times on a file

bash,file,sed,process,command
I want to apply several times this sed command to a file: sed '1~2d' file.txt>file1.txt let's say I want to do it 4 times, is there a way to do this process getting also the intermediate files? Thank you in advance Best Regards (The files are 1m UTM coordinates and...

How to use process to run several commands

c#,process,exit-code
I have a process , use it to run several commands. Process mycmd = new Process(); mycmd.StartInfo = startInfo1; mycmd.Start(); if (mycmd.ExitCode > 0) { // do something } mycmd.StartInfo = startInfo2; mycmd.Start(); if (mycmd.ExitCode > 0) { // do something else } First time the command is executed the...

If I created a process, does it mean that I will always be able to terminate it?

c++,c,windows,winapi,process
Say, if I created a process using CreateProcess or CreateProcessAsUser APIs, does it means that calling TerminateProcess(PROCESS_INFORMATION.hProcess) will always kill that process no matter what context my host process is running in (low privileged user, built-in Guest, etc)?

Limit a set of processes' CPU and memory usage

linux,osx,process,resources,limit
Browsing the web has low priority for me, and so I would like all the processes that deal with it to be low priority, too. Is this approach a valid one? Open a console window with the nice command. Launch the browser from this console. Will the program launched from...

Why does Process.Start(string) return null for a WMV file

c#,process,wmv
So I have a WMV video file: var fileName = @"C:\MyFolder\MyVideo.WMV" and I am starting the video and getting my Process ID with the code: var process = Process.Start(fileName); if (process != null) { processId = process.Id; } Although my video file starts, process is always null. From Process.Start(string) MSDN...

How to get shell expansion on scala sys.process invocations

scala,process,expansion
Consider a simple attempt at shell expansion: Simple/direct approach : scala> ("/bin/ls /tmp/*" run BasicIO(false, sb, None)).exitValue ls: /tmp/*: No such file or directory res18: Int = 1 I have tried a number of combinations of ProcessIO, BasicIO, Process, etc and can not figure out how to get shell expansion...

Interrupting an unknown long-running function after a certain time period

java,android,multithreading,service,process
I am using an OpenCV function in a compiled library on Android. It regularly runs for more than 10 seconds until it fails. A success will take approximately 2 seconds. I want to be able to interrupt the function if it takes more than 2 seconds. At first, I tried...

Unexpected output with fork() [duplicate]

c,unix,process,output,forking
This question already has an answer here: printf anomaly after “fork()” 3 answers I read somewhere that in Unix, after fork() is executed successfully, both processes will start their execution at the next statement following the fork() call. Meanwhile when I run this code in C #include <stdio.h> int...

Process Vs Thread : Looking for best explanation with example c#

multithreading,process
Apologized posting the above question here because i read few same kind of thread here but still things is not clear. As we know that Both processes and threads are independent sequences of execution. The typical difference is that threads (of the same process) run in a shared memory space,...

Trouble Understanding Fork Logic

process,fork,system-calls
Can someone help me understand what is happening in this segment of code? I am having trouble understanding why the output is how it is. Output is: 0 1 2 3 4 3 2 1 0 int main() { int i; for (i = 0; i < 5 && !fork();...

Sending keyboard key to browser in C# using sendkey function

c#,process,sendkeys
Hello i am trying to send a key to browser using the code below, the new chrome window opens for me but it does not send the key to the browser. When i debugged i found out chrome process does not have any title name how can i solve this...

Execute a bash command string verbatim (including expansion and escaping)

bash,scala,process
I am looking for how to submit a string to external bash verbatim. Bash should handle wildcard expansion and escaping. The testing is with the process library: import sys.process._ That imports the required process DSL implicits into scope. Let us try an escaping test: here is the desired result run...

Multiple behaviours for single entity

testing,process,entity,vhdl
I wrote a VHDL Testbench which contains the following : Lots of signal declarations UUT instantiations / port maps A huge amount of one-line concurrent assignments Various small processes One main (big) process which actually stimulates the UUT. Everything is fine except the fact that I want to have two...

How is a process state updated to blocked state (TASK_INTERRUPTABLE)?

kernel,process,io,block-device,scheduling
When a process is waiting for IO, how is the task state updated to TASK_INTERRUPTABLE (that is, blocked)? Imagine this case, a process issues an IO request to a block device. According to my previous thread, the process finally invokes elv_add_request() to add the request to the IO queue. So...

Windows/Linux child process STDIN differences

linux,windows,perl,process,stdin
I built a simple text processing script at work to be used by another program. When I was done, someone remembered that the script needs to not block STDIN/STDOUT for the tool using it to work right, and modified the script accordingly. The script opens *nix's cat in a subprocess...

stdout and stderr redirection in child process

bash,unix,process,stdout,stderr
If I run a Bash script like this: ./script.sh 2>&1 stderr will be redirected to stdout. If the script calls some tool inside (e.g. ls) or spawns a new process, will these child processes have their stderr also redirected to stdout?...

Handling the child process starting

node.js,process,spawn
I'm using spawn for creating child processes. I want to create a child process and after it is started I want to exit the current process. var Spawn = require("child_process").spawn; var sp = Spawn("sleep", ["10000"]); sp.unref(); process.exit(); The code above works fine: it creates a child process (sleep) which will...

Gantt chart for FCFS with priority?

process,priority,gantt-chart
Process----Burst Time----Priority----Arrival Time P1----------10--------------3-----------0------------ P2----------1---------------1-----------0------------ P3----------10--------------3-----------1------------ P4----------2---------------2-----------1------------ My question is, when drawing a gantt chart for First Come First Serve do you take into account the priority when two processes have the same arrival time? i.e. would the gantt chart be: P2------P1-------P4-----P3-------- 0-------1---------11-----13-------23 or would you not take...

Does cron job block the main process or nodejs will create a worker to do cron task

node.js,process,cron,backgroundworker,cron-task
I am using node-cron to do some heavy tasks (update database) every minute. Does this task use main process to work or nodejs will create some workers to do these taks? var CronJob = require('cron').CronJob; new CronJob('0 * * * * *', function() { //Update database every minute here console.log('Update...

What is a kernel stack used for?

process,operating-system,stack,kernel,context-switch
The following is a description I read of a context switch between process A and process B. I don't understand what a kernel stack is used for. There is suppose to be a per process kernel stack. And the description I am reading speaks of saving registers of A onto...

Java: interact with another process

java,process
If I have a random program, that shows some text and has some text input, is there a way to write a java program, that reads that text labels and/or fill that text input fields and press an ok button?

Kill a node.js program without killing child processes

javascript,linux,node.js,process
I have a node.js program that has started multiple child processes. I want to be able to test what happens to those child processes if node crashes but leaves them up and running. I tried the following: process.on('SIGUSR1', function(){ process.exit(0); }); This worked great on my test setup, the child...

C# Process Termination notifications

c#,events,process,exit,terminate
I am currently looking for a way to delete a certain file when a specific process has closed. I've found plenty of examples for creating a process and adding an event handler for exited but I need to get notified of any processes in the system, not just those I...

Concurrent programming - Is it necessary to manually lock files that multiple processes will be accessing?

c,concurrency,process,fork
I know for pthreads, if they're modifying the same variables or files, you can use pthread_mutex_lock to prevent simultaneous writes. If I'm using fork() to have multiple processes, which are editing the same file, how can I make sure they're not writing simultaneously to that file? Ideally I'd like to...

In the dart:io library, why would one want to set runInShell: true when calling Process.run?

shell,process,io,dart
What functionality does this offer? Furthermore, how does the process get called when runInShell is set to false? What's the difference?

How to tell if child Node.js Process was from fork() or not?

javascript,node.js,process,fork
I have a small application that could be executed by a fork or directly by a developer, and I would for it to get configured slightly differently depending on how it was started. I know that I could always pass in arguments to to signal that it was a fork,...

How to get process id of Console in C# console app

c#,process,console-application,managed,processid
In my hello world console app, Process.GetCurrentProcess().Id property returns a different value from the Id for the Console window created to display the app's stdout etc. How do I get the process id for the console window specifically? I cycle through the processes in Process.GetProcesses() and check for the console...

How do I call this command via Java's Runtime.getRuntime().exec method? [duplicate]

java,linux,process,runtime.exec
This question already has an answer here: Java Runtime.getRuntime().exec() alternatives 6 answers The following command runs correctly in my Linux terminal: java -Djava.library.path=/home/john/native_so_libraries/linux-64 -cp '/home/john/NetBeansProjects/SendReceive/dist/SendReceive.jar:/home/j‌​ohn/Desktop/Dropbox/Libjitsi_linux_64/*' Main "send" This command specifies a folder for native .so libraries (via Djava.library.path=/...), an application JAR file named "SendReceive.jar", a folder for JAR libraries...

Python 2.7 multiprocessing get process result whithout using pool

python,process,multiprocessing
How can I get the result from my process without using a pool ? (I'm willing to conserve an eye on the progression: (print "\r",float(done)/total,"%",) which can't be done using a pool as far I know) def multiprocess(function, argslist, ncpu): total = len(argslist) done = 0 jobs = [] while...

Bind multiple threads to multiple CPU?

multithreading,process,operating-system,scheduler
I have multiple threads that are accessing the same data and it is too painful to make them thread safe. Therefore, they are now forced to run only on one CPU core using CPU affinity and only one thread can be running at the same time. I was wondering if...

how to set dynamic arguments for a process?

c#,bash,process
In bash I run the following kill commands (it's just a kill with an expression which return the ID of a process) kill $(ps -ef | grep '[m]atchbox-panel --titlebar --start-applets showdesktop,windowselector' | cut -f8 -d' ') which return something like kill 800 When I try to run this in C#...

Who waits for a shell background process?

linux,bash,shell,process,wait
I was wondering about this question: If I type the following command in bash # sleep 100 & How come the shell knows to wait for it to end? When the shell forks itself in order to exec the sleep command, doesn't the ampersand technically means it's not going to...

Why this indeterminate jProgressBar don't work in this simple code?

java,swing,concurrency,process,jprogressbar
I want use an indeterminate jProgressBar on a JForm but I don't know why in my code don't work. The jProgressBar must be in the indeterminate status until the thread receives a latch.await() signal. This is the simple part of code when I push a button: private void jButton5ActionPerformed(java.awt.event.ActionEvent evt)...

How to set input and capture output for one process

c#,.net,process
I'm writing small console app for comunicate with chess engine. I'm setting process class properly and I can set input, but I can not capture output. With this starting parameters startInfo.RedirectStandardInput = true; startInfo.RedirectStandardOutput = false; input is possible. When I'm setting startInfo.RedirectStandardOutput = true; only empty console window is...

Powershell Delete Locked File But Keep In Memory

powershell,process
Until recently, we've been deploying .exe applications by simply copying them manually to the destination folder on the server. Often though, the file was already running at the time of deployment (the file is called from a SQL Server job)--sometimes even multiple instances. We don't want to kill the process...

Multiple process execution and Ordering issues in docker-compose

bash,process,zookeeper,race-condition,docker-compose
I am trying to launch a zookeeper server and a bootstrap process for my API and another process which has to consume data written by my API to the zookeeper server using docker-compose. Once I execute docker-compose up, my zookeeper server launches successfully and my bootstrap API is able to...

exe won't terminate in Java using Process

java,c++,process
In my Java program I run foo.exe using following statement : Process process = new ProcessBuilder("foo.exe", parameter1,parameter2).start(); process.waitFor(); and in my foo.exe it was written in C++ as follows: int main(int argc, char *argv[]) { //some statement return 0; } however from task manager, the foo.exe won't terminate and my...

erlang processes and message passing architecture

concurrency,process,erlang,messages
The task I have in hand is to read the lines of large file, process them, and return ordered results. My algorithm is: start with master process that will evaluate the workload (written in the first line of the file) spawn worker processes: each worker will read part of the...

Does PSS (Proportional Set Size) number for a process include the memory consumed by kernel code?

linux,memory,process,uss
I used the smem command to find PSS/USS numbers for a process. As per the smem man page, "The unshared memory (USS) plus a process's proportion of shared memory is reported as the PSS (Proportional Set Size)." Now does all the Linux kernel code resident in memory get included when...

In C# how do I have a process.WaitForExit(time) that overrides a standard process.WaitForExit()?

c#,process,waitforexit
I want it to wait for the process to end before continuing, but if it doesn't end in x amount of time, continue anyway. Thank you in advance for your help.

To check whether an application is running or not using java?

java,windows,process
I have a java application which start an another java application (third party) in background, so before launching third party background application I want to check whether that application is already running or not(don't want to wait for termination of that application). I am using the following code for launching...

Java processbuilder and using environment variables

java,linux,process,environment-variables,processbuilder
What I want to do is I want to run a process, however because this process itself relies on environment variables, directly calling it causes error within the process. For those who are wondering what this is, it's rake tool. For this reason I thought maybe it's better to use...

Operating Systems - General Process Creation

process,operating-system
Review Question Consider the Program #include <stdio.h> int main(){ putchar('X'); exit(0); } Suppose it is compiled an an a.out file is generated. now suppose that a user in a local console window types a.out and hits the return key. what happens? be sure to describe a plausible but detailed and...

Check if app is already running, and if kill it C#

c#,process,singleinstance
I know that Mutex can be used to determine if another instance of application is running, but can I find from Mutex the PID or name of the other instance? And if not from Mutex, is there another way around to kill other instance if it is running. This is...

Make shell prompt wait till all processes complete

bash,shell,process,scrapy
I am running a shell script from a java program. The shell script will start multiple scrapy crawlers. #!/bin/bash cd /Users/renny/Documents/WorkSpaces/Scrapy/tutorial scrapy crawl flipkart -a key="$1" -o "$2"flipkart.xml scrapy crawl myntra -a key="$1" -o "$2"myntra.xml scrapy crawl jabong -a key="$1" -o "$2"jabong.xml The shell script will not wait for the...

Find the path of every running process in Python

python,windows,process,path,psutil
I want to find the path of every running process in windows. I tried to use the psutil module but it doesn't show me all the paths. It can't find many processes' paths because of the error: "psutil.AccessDenied" c = wmi.WMI() for process in c.Win32_Process(): p = psutil.Process(int(process.ProcessId)) try: path...

How can i avoid android background process starvation?

android,process,su,thread-priority
I'm running a native background process from an android app with Runtime.exec(). It seems like every few seconds the process is put to sleep for like 200 ms. It looks like the android operating system is just starving that process. Is there some way I can change the process priority...

How to start an application as a child of a newly created explorer process?

c++,winapi,process
I'm working on an application that resembles a kiosk. After the application starts, it creates a new desktop with limited capabilities. Using a key combo I can move back and forth between desktops. In order to inform the user about the desktop it's currently using, or any other information I've...

How to accurately kill child process after certain time limit in C?

c,linux,unix,process,fork
I've been attempting to write a program that can accurately kill a forked process after the child exceeds a certain running time. The process should be spawned from an executable on the disk. I am using linux, here. Let's not even consider the ugliness of simply forking a process on...

What is the difference between a Process' pid, ppid, uid, euid, gid and egid?

ruby,process,pid
Context: I'm getting the current Ruby process ID. Process.pid #=> 95291 Process.ppid #=> 95201 Process.uid #=> 501 Process.gid #=> 20 Process.euid #=> 501 Process.egid #=> 20 ...

Execute a function in a new process node

node.js,process,fork
I am looking for a way (a npm module or a lib would be really useful) to run a javascript function in a new process. However, I don't want to define this function in a different file. I am looking for something like the POSIX fork mechanism. how can I...

checking if a process contains a name

vb.net,process
I can check process a by using: dim Proc as process() = Process.GetProccessByName("flashplayerplugin") but since flashplayerplugin has a version included in the process name, my program won't detect it, because the process name is something like flashplayerplugin_34_21_6.exe So how can I check if a process name contains flashplayerplugin?...

How to throw an alert if any PID in linux goes above a certain limit?

linux,performance,process,monitor
I want to make a process monitor that runs in the background and does not take up a bunch of memory. I will be logging in to the remote computer via SSH and if at all possible would like to run the script on my local computer. I need it...

Why is the “Process ID” counter in “.NET CLR Memory” category constantly zero?

.net,process,clr,performancecounter,perfmon
Under the ".NET CLR Memory" performance counter category, there is a counter named "Process ID". Any given instance of this counter is supposed to return the Process Id of the Windows process associated with the instance. For my own processes, this counter always has a zero value. Why is that?...

Where is TCB located on FreeBSD?

multithreading,process,operating-system,freebsd,netbsd
Where is the kernel thread control block (TCB) located On FreeBSD? (After the thread is interrupted, where is the context (containing %RIP/%EIP) saved?) Is it on the kernel stack or somewhere else? In FreeBSD, are process and thread quite similar, like on Linux, or totally different abstractions?...

Batch script ignores %ERRORLEVEL% or using previously set one

batch-file,process,errorlevel
I wrote a batch script to find out if a specific process runs on a computer:     for /f %%a in (computers.txt) do (     PsList.exe \\%%a -e "process" > result.txt     Find /i "found" < result.txt     IF "%ERRORLEVEL%" == "0" echo %%a >> Computers_without_process.csv...

Java Runtime.exec() doesn't honor Linux alias

java,linux,process,alias,spawn
I have a compiled third party java program which uses Runtime.exec() to spawn a process but i wanted to add additional arguments to the process when the process starts using alias, but Java Runtime.exec() doesn't seem to honor. I tried with my own program but still it doesn't see to...

erlang message passing architecture

process,erlang,messaging
In erlang if two processes A and B are sending message to a process C simultaneously. Will there be a race condition? C ! {very large message} sent by A C ! {very large message} sent by B Will C receive the complete message from A and then proceed for...

Process ID of process Started by Process Start

c#,winforms,process,system.diagnostics
I am trying to kill the process by process ID which I am saving when the process start. But the process ID which I am capturing doesn't exists when I try to kill the process from code behind. This is the code below to start the process and capture the...

Processes sharing a CPU (scheduler)

process,operating-system,scheduler,round-robin
Question A scheduler attempts to share the CPU between multiple processes. Two processes, P1 and P2, are running. P1 does many I/O operation, while P2 does very few. Explain what happens if a simple ‘round robin’ pre-emptive scheduling algorithm is used to schedule P1 and P2. My Attempt From my...

Start a function from a thread. (GUI thread and QThread errors)

python,multithreading,process,pyqt,qthread
I've made routine with Python's threading module to run a subprocess and wait for it to finish. I do the threading with the following line : t1=Thread(target=self.routineFunction, args=(self, "file1.txt", "file2.txt", self.nextFunction)).start() Inside my function routineFunction(self,file1,file2,nextFunction) I call the next function to run once the subprocess has finished running. Everything works...

Is it possible to disable the “Application has stopped.” dialog that pops up on Android?

android,opencv,service,process,kill
I am trying to kill a service that is running on a separate process that is taking too long to run. It does get killed but the dialog "Unfortunately, Application has stopped" pops up. Since it's a separate process, it doesn't kill the main process and the application does keep...

what is UID in linux?

android,linux,unix,process,uid
what is UID in linux? Wiki and other online sources say it is user ID. But what exactly is user id? The name "user id" gives me a sense that it is the user who is using the OS. Like If I have only one user, my user id should...

RHEL Java application - specific name instead of generic java process

java,linux,process,rhel
I have a custom Java application running on my RHEL machine. I am running this Java application from a bash exec script with all the parameters and options appended. As a result, my Java application gets a generic name "java" in the system processes which is not useful for me...

Lua: how to check whether a process is running

process,lua
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 still runs....

Process not running properly when started from a thread in C#

c#,multithreading,process
I have a dll compiled in C# that executes an external process (wkhtmltoimage) in addition to performing a number of other functions. Under normal use conditions, there are no problems. The process starts, standard in/out are both redirected properly, and I get the output I am expecting to see. However,...

How do I fork an external process in java

java,process,operating-system,fork
I'm trying to fork a new external process (such as Calculator) in Java. I'm new to operating systems but I learned that it's possible using something like : Runtime.getRuntime ().exec ("C:\\Windows\\system32\\calc.exe");. However that doesn't actually fork a new process. Is there anyway I can fork an external process using java?

How to create a socket between 2 processes after fork-exec

c,sockets,unix,process
i'm learning C and this is my problem: i need to connect 2 processes with a socket AF_UNIX. My question is: how can i achieve that ? I've already tried something with poor results: Tried to pass the fd. Tried to dup but again failed and the 2 processes didn't...

How to introduce string by keyboard in child after fork

c,concurrency,process,signals,scanf
I'm exercising over concurrency in C, I wrote a small and simple program in which a parent process creates two children, sender and receiver. Sender will read from stdin a string and then procede to send it in some way to receiver (not relevant). The real problem here is that...

Java run async processes

java,multithreading,asynchronous,process,processbuilder
I am trying to run an async process and I do not want the program to wait until the end of these processes executions. I found this question how to run shell script asynchronously from within Java program but it doesn't have the answer that I am looking for. What...