Questions tagged [process]

This label focuses on the functions of operating system processes. Additionally, it might also pertain to a distinct feature unique to a particular platform, such as the System.Diagnostics.Process counterpart specifically designed for .NET programming language.

"Understanding How to Utilize the Grpc Stream Variable for Extended Processes in Node.js

Utilizing Node.js for connecting to a server through gRPC in order to execute a lengthy task. The server sends a one-way stream to the client (Node.js app) while the task is ongoing. I am looking to add a Stop button and have been advised that closing the ...

Complete interaction with child processes in Node.js

I have a basic C++ program compiled using the command gcc 1.cpp -o 1.exe. // 1.cpp #include <stdio.h> int main(){ int num = 0; scanf("%d", &num); printf("%d", num + 1000); scanf("%d", &num); printf("\n%d", num + 1000); ...

What method yields more efficient results when working with arrays?

Even though I often use foreach and while loops, I've been curious about whether there is any difference in performance when using the for(i=0;i<varlength;i++) loop. Can you explain how PHP processes for() and foreach() loops differently? ...

Terminate the execution of the process.exec function

Currently, I have a function in my code that is responsible for executing a specific process. Here's how it looks: static async runTest() { await process.exec(`start ${currentDir}/forward.py`); } runTest(); Here's the thing – once this Python script st ...

What is the method for reaching the electron process from a different npm process?

Recently, I developed a script that sets up a TCP server to listen for incoming requests and triggers a Windows notification upon receiving one. Here's the code snippet: const notifier = require('node-notifier'); const path = require('path'); const net = r ...

Send input to an existing process in Node.js without needing to launch it from within

My current program is not initiated within Node.js, which means I am unable to utilize the stdin from a spawned process. Instead, I have access to the PID of the process that is awaiting input via stdin. How can I write to this process using my Node code? ...

Ensure that the memory usage of each process in Node.js is restricted to under 300MB

We execute tests in different instances and some of our test suites consist of more than 20 files. Is there a way to restrict the memory usage of a Node.js process to less than 300MB instead of allowing it to grow? If we don't set any limits, each process ...

Is there a way to determine if a specific PID is running in PHP without using the ps command?

Is there a PHP function available to determine if a specific process is currently running? We are looking for a quick way to input a PID and verify its execution status. Could PHP offer an internal method to retrieve this data, or do we need to extract i ...

The error message "Uncaught ReferenceError: process is not defined" indicates that

While attempting to execute my code, I encountered the following error in the React console: An uncaught ReferenceError: process is not defined I am seeking guidance on resolving this error. Any assistance would be greatly appreciated. ...

Are there alternative approaches to launching processes aside from the functions found in child_process?

Having trouble with NodeJS child_process in my specific use case. Are there other methods available to start processes from a node.js application? So far, Google has only been pointing me towards child_process for all of my inquiries. Edit I am looking to ...

Tips for utilizing process.stdin in Node.js with Javascript?

Currently, I'm developing a Javascript-based poker game that is designed to process standard input in the following manner: https://i.stack.imgur.com/D1u15.png The initial line of input will consist of an integer indicating the total number of players. T ...

Finding a way to compare the input from `process.stdin` with a string in Node.js

I came across a solution at the provided link, but even after implementing the suggested code changes, it still doesn't work as expected. The output only contains the data without the log message inside the if statement. I have also attempted using to ...