Questions tagged [process]

11354 questions
1

votes
1

answer
565

Views

What is the signal sent to the process running in the container when k8s liveness probe fails? KILL or TERM

I have a use case to gracefully terminate the container where i have a script to kill the process gracefully from within the container by using the command 'kill PID'.( Which will send the TERM signal ) But I have liveness probe configured as well. Currently liveness probe is configured to probe at...
Beatrix Kiddo
1

votes
1

answer
686

Views

what is the difference between block, suspend and sleep

For example, a process is listening on some port with block mode, so if the I/O is not ready, the process will be blocked. while (true) { msg = recv(port, BLOCKING_FLAG); // blocks here cout
Yves
1

votes
2

answer
39

Views

Node Server Running on Ubuntu that needs to execute a C# application - how?

I have a very simple C# application that was written by a previous person. It uses the MD5CryptoServiceProvider to compute hash using some seed strings to generate a random code. I have a Node.js server running that I'd like to execute this app and consume the output. I cannot figure out how to run...
user2348688
4

votes
3

answer
113

Views

How can I get the CPU usage of a process with “tasklist” in Windows

I am writing a program in Java to periodically display the CPU and memory usage of a given process ID. My implementation invokes tasklist. It is pretty straightforward to get the memory usage by the following command: tasklist /fi 'memusage ge 0' /fi 'pid eq 2076' /v This will return the memory usag...
JakeSmitch
1

votes
1

answer
47

Views

child_process.spawn() hangs when child process prompts for input

I've written a node script to manage deployment of a git repository to a AWS autoscaling group. The script uses child_process.spawn() to automate git, to clone repositories, checkout tags etc. It works fine if git can find appropriate credentials. However if credentials aren't automatically found, t...
user1751825
-1

votes
1

answer
34

Views

How to run .exe Command-line program from C# without “Access denied”?

I would like to run command line .exe file in C#. It works well if I run without C# as following: 1.I open cmd.exe without administrator rights, by one click. 2.Go to directory: cd C:\libs\windows 3.Execute the .exe file (bff-command-line is exe file): bff-command-line in.obj out9.obj But I would li...
Petras Vestartas
0

votes
0

answer
5

Views

pm2 eats cluster logs when using child_process

I'm using PM2 v.3.2.2 I have a nodejs program composed of 2 script: main.js and child.js. main.js creates a child_process.fork of child.js. main.js and child.js print some logs using console.log. If I start the main.js script using pm2 start main.js everything works great, I can see both logs. If I...
Gappa
1

votes
1

answer
33

Views

Process never ends when using 'process.stdin.once'

In my node script, I am waiting for the user to press enter at some point: console.log('Press enter to continue...'); await new Promise(function(resolve, reject) { process.stdin.once('data', function(data) { resolve(); }); }); The script runs fine, and continues only after the user has pressed enter...
goodvibration
1

votes
2

answer
3.4k

Views

The process cannot access the file because it is being used by another process. Jenkins Build

When we abort one of the Jenkins Job builds running on windows slave, and then try to retrigger, that new triggered build fails with below error: The process cannot access the file because it is being used by another process. while deleting the workspace.
Anurag Sharma
1

votes
1

answer
326

Views

How to kill a npm child process

I've a package.json on which I define a debug script. This script launches a node app. The whole npm script is being launched by a test, and this last one must kill the debug script once the test ends. So when I spawn npm run debug and I kill it, the node process isn't killed. I've tried to either...
Matías Fidemraizer
1

votes
0

answer
51

Views

Reserve specific core for python script PYTHON RPi3 RASPBIAN

Hello I'm running some python script on Raspberry Pi3. I noticed strange behaviour. Let's assume that I run this python script and it use specific core for example 3. (RPi3 have 4 processing cores). I noticed that from time to time this code is running on other core. There is an option to set up it...
KyluAce
1

votes
0

answer
127

Views

carrierwave process uploaded file in a custom way

I want to do the following: convert the uploaded file to jpeg2000 using the command kdu_compress not use rmagick or minimagick to do this stuff All examples in carrierwave are using rmagick or minimagick, and act on a in memory loaded image file. So I don't really know how to convert something using...
user2814957
1

votes
2

answer
297

Views

Set process title in visual studio attach to process c#

I want to set the process title of my console application in the attach to process dialog of visual studio. I tried to set the assembly name, process description, etc.. but it didn't work. How can I achieve this in C#?
Antoine Lafarge
1

votes
0

answer
507

Views

Threadpool Vs ProcessPool in python3?

I was working in a code which performs lots of io operations like file downloading and graphs generations there may be 1000 plus files which will be the good method for this? concurrent.futures.ProcessPoolExecutor(max_workers=10) futures = [executorinsar.submit(locals()[configid + 6].ftptester, ch)...
chris1234
1

votes
1

answer
300

Views

AltBeacon service in separate android process

I need help. There is an application for Xamarin Android. Inside it, a service is started that works with the AltBeacon library. In this service, a thread is created, in which beacons are constantly being scanned. Service started as StartForeground(...). The service should work constantly, so it wa...
OlegS
1

votes
2

answer
605

Views

Powershell Script Start-Process is not working

I have a Problem with my script, and I can't find the solution. Allways when I try to run this script it says: Cmdlet Start-Process an der Befehlspipelineposition 1 Geben Sie Werte für die folgenden Parameter an: FilePath: What does this mean? I know I'm not very good in Powershell, just began to s...
andràs Horber
1

votes
1

answer
458

Views

How to attach OllyDbg to hidden process?

I am trying to reverse engineer a program that requires a serial key to run. The problem is that when i want to attach OllyDbg to the program, the process is basically not coming up. When i opened task manager to try and find the process, i could easily find it. Can someone explain why this happens,...
Lukas Knudsen
1

votes
0

answer
274

Views

Analyzing the ANR I occurred in android 8.0

The ANR was from a Monkey test, the probability of this issue is about 10%. It seems that there was a deadlock happened in binder driver, but I can't get more information from this ANR log, anyone could give me some hints or suggestions on tackling this issue, the ANR main thread log is blow: main'...
alexunder
1

votes
0

answer
64

Views

Paralelism with Gunicorn, Ngnix and Celery

i am not sure how paralelism can be or should be combined between gunicorn and celery (and probably ngnix). 1) So first of all I use Nginx. 2) Secondly, i run gunicorn like this gunicorn -k gevent --worker-connections 1001 --bind=unix:myapp.sock -m 007 wsgi:application 3) Thirdly i run celery like t...
Laimonas Sutkus
1

votes
0

answer
59

Views

Resume downloads on iOS between lifecycles

I am trying to make sure that if my background download on iOS stops for whatever reason (app is killed by the system, stopped by the user from the multitasking screen, crash?) will continue in the next lifecycle. So far I have found that the documentation for NSURLSession clearly differentiates bet...
std_move
1

votes
1

answer
68

Views

VBA code executes but only if I step thru it

I used some code from Close an opened PDF after opening it using FollowHyperlink to create the following code to open a pdf file and rename it. The code runs fine but only if I break execution at MsgBox 'Break Here' and step into it with the F8 key. Any ideas on why it won't execute automatically? S...
davidnt
1

votes
1

answer
290

Views

Reaping zombie processes via handler

The code written below is to handle the received signals and reap the zombies by the parent process 'from System Programming course of CMU'. Q1. what is the rule of -1 'the first arg of the waitpid function'? should not we pass the pid of the zombie we are reaping instead? Q2. For the loop here,...
White159
1

votes
1

answer
351

Views

Preserve order of `stdout` and `stderr` output of `child_process.spawnSync` subprocess in Node.js

const spawnSync = require('child_process').spawnSync; let x = spawnSync('bash', ['-c', 'echo '1stdout' ; echo '2stderr' >&2 ; echo '3stdout'']); (The bash command is only an example. The command could be ls or wget or git - doesn't matter.) Of course, I can access stdout of the subprocess with x.std...
finefoot
1

votes
1

answer
33

Views

Check if iOS app is running in BG

I am running the application in background via VOIP notification, I fire a special function in timer which lets me know on cloud that application is running in BG. The problem is when I check the apps running in BG by pressing two times home button it does not show me the application is running in...
Naveed Rafi
1

votes
0

answer
170

Views

How to start a process and keep it running throughout the time in java

I had a scenario where a process need to be started using ProcessBuilder. After starting the process successfully, I open the inputstream and outputstream of the created process and passed the arguments through the outputstream and retrieved the result through the inputstream. It is working fine for...
user_3093890
1

votes
0

answer
157

Views

Error executing command: permission denied

I have an executable called iperf to measure network speed. The executable is an asset which I copy to my app files dir programatically. After that, I execute chmod command with 777 permission over this executable, with: val processChmod = Runtime.getRuntime().exec('/system/bin/chmod 777 ${getExtern...
1

votes
0

answer
108

Views

Node.js: Use child_process file descriptor as temporary file for key output in spawning openssl

I am trying to generate a self-signed certificate using openssl from a spawned child_process in Node.JS. Because of factors, I want both the generated private key and certificate to be output directly to memory (stores as strings in memory) without writing to the filesystem. this is easy enough for...
Aaron_H
1

votes
1

answer
278

Views

Does `strace -f` work differently when run inside a docker container?

Assume the following: I have a program myprogram inside a docker container I'm running the docker container with docker run --privileged=true my-label/my-container Inside the container - the program is being run with: strace -f -e trace=desc ./myprogram What I see is that the strace (despite having...
hawkeye
1

votes
1

answer
51

Views

How to run a process and quit after the script is over?

I have asked a question how to run a clipboard clearing command from python, and I got a good answer for that: subprocess.run('xclip',stdin=subprocess.DEVNULL) subprocess.run(['xclip','-selection','clipboard'],input='') This seem to work in python, but there is a problem, it leaves the process open....
Markus84612
1

votes
1

answer
71

Views

Executing shell scripts that take long time using child process module in nodejs

Below is my code written to execute a script called mqValidation.sh in UNIX by sending an AJAX request. This spawns a new child process and when the child process exits, it sends a text file response which obviously contains the output of the script. But, the issue I'm facing here is, as the script...
koteswar
1

votes
2

answer
218

Views

Downloading data when iOS app goes in background

I have a app which downloads a huge amount of data (mostly images and document files) when it is installed for the first time. Currently, I'm only able to display the progress in a HUD. But I wish I could somehow allow the data to be downloaded when the app goes into background (or device gets locke...
Prashant
1

votes
1

answer
127

Views

Why SIGPIPE doesn't occur when the read end of a pipe is closed?

I'm trying to write a program with two processes: One process generates some a + b problems and print it to its stdout (like printf('%d %d\n', a, b)), and gets the answer from another process through stdin, and log the answer to log.txt. When all the problems are asked, the process will print out '-...
TsReaper
1

votes
0

answer
296

Views

Node-JS - Express and child_process capturing output

I am wondering if there is a way for me to have an express server handle requests to a child_process process. For example, I want to be able to send a command to for example cmd.exe, and get the response to emit to the client doing the request. Thanks. EDIT: How I've tried it so far is: Spawn the ch...
Tyler Wilson
1

votes
1

answer
253

Views

Forked child process keeps terminated with code 1

I wrapped a module using Electron Packager. Because it has heavy computation, i put it in a sub process that would be forked from renderer.js when user clicks a button on index.html. Pseudo-code renderer.js from : let cp = require('child_process'); let subprocess; function log(msg) { // A function t...
phet
1

votes
0

answer
622

Views

Get processes name (like you can see in task manager)

How to get this part of process name with C#? WindowsAPI.GetWindowThreadProcessId(hwnd, out pid); Process p = Process.GetProcessById((int)pid); p.MainWindowTitle.ToString(); is closes I've got to. But for many programs it shows opened window names. For example instead of 'Google Chrome' it shows nam...
JuztBe
1

votes
2

answer
215

Views

run Process in Java

in my Java Application i start a postgres process to backup my database. Thread thread = new Thread(() ->{ Process p; try{ p = Runtime.getRuntime().exec('cmd /c pg_dump -v -a -d '+database+' -h '+server+' -p '+port+' -U '+user+' -n public > ' + file.getPath()); p.waitFor(); }catch(Exception e){ retu...
OHA
1

votes
1

answer
163

Views

Filenet - How to get the value of F_Webserver in email template

I am using CPE 5.2.1 and trying to make use of email templates to send an email notification which has a link to workitem. In that, we have F_Webserver & some other variables and I don't know how to get the values for these field variables. I was thinking that it should be fetched automatically beca...
PC84
1

votes
1

answer
34

Views

Which user is started with a process in java in LinuxI?

I'm trying to start chrome headless through Java through processBuilder and here's my code : pb = new ProcessBuilder(CHROME_UBUNTU_PATH, '--headless','--enable-logging', '--disable-gpu','--print-to-pdf=' + filePath + '.pdf','file:///' + absolutePath); pb.start(); But chrome wouldn't start cause it's...
Moatez Bouhdid
1

votes
0

answer
223

Views

POWERSHELL Kill a process that starts during a Call operation

I am making a call operation in a counted FOR LOOP for an array called $files so every call it does: for ($i=0; $i -lt $files.Count; $i++) { & $executable $files[$i].FullName -ErrorAction Continue | Out-Null } So $executable is the exe I'm running with every file in the $files. But during this call,...
Catu
1

votes
0

answer
28

Views

JVM process parent

I'm creating a process with processBuilder in java program in Ubuntu : pb = new ProcessBuilder(CHROME_UBUNTU_PATH, '--headless','--enable-logging', '--disable-gpu','--print-to-pdf=' + filePath + '.pdf','file:///' + absolutePath); pb.start(); But chrome wouldn't start cause it's running with the user...
Moatez Bouhdid

View additional questions