process

Any better alternative to fork() and then execvp(" gcc program.c ") ?

Hi, The following code segment takes more time (5s) when it is run first time and takes less time(250ms) on consecutive runs. Is there any better way to execute gcc. int pid,status; char * argv[] = {"gcc","program.c",NULL}; if(!(pid=fork())){ execvp("gcc",argv); } while(pid!=wait(&status)){ //do nothing } ...

How Program Becomes a Process. How OS makes Program a process

I wanted to know How OS actually makes a program in to process. what are steps Os engages to make program a process. I mean How a Program becomes a Process, what are the parameter OS adds to kernel datastructure before making a program a process Thank you in advance. ...

(C#) How to set an project's executable processname?

Hello. I'd like to have my executable's process be called ABC. How I can do this? I tried defining my project name to ABC, but then I'll have an ABC.vshost. Thanks ...

How to find which process the linux os running at a given moment ?

So a OS multi-tasks and runs one process at a given moment (assuming it's a single core machine). Is there a way I can track/poll and find which process was running at what time and at what time it was put in the queue and retrieved back. Are there any system calls for this ?. Is there a way to achieve this without modifying the linux ke...

WAIT for "any process" to finish

Is there any built in feature in bash to wait for any process to finish? We use " wait" only for the child processes to finish. I would like to know if there is any way to wait for any process to finish before proceeding in any script. A mechanical way to do this is as follows but I would like to know if there is any built in feature in...

results from debug diff from release

I have this code here: #include "windows.h" #include "Tlhelp32.h" #include "shellapi.h" #include <wchar.h> #include <fstream> bool enumProcesses(); int main() { enumProcesses(); ShellExecute( NULL, L"open", L"log.txt", NULL, NULL, SW_SHOW ); return 0; } bool enumProcesses() { std::wofstream log("log.txt"); PROC...

How to create a process in C++ on Windows?

Hi Can anyone tell me how to create a process in VC++? I need to execute regasm.exe testdll /tlb:test.tlb /codebase command in that process. ...

process.existed() not getting fired

Hi can some body help me how to call process.existed() method in c#? Actually i registered that method in page load it self only but it is not getting fired may i know the reason? myprocess.Exited += new EventHandler(myprocess_Exited); void myprocess_Exited(object sender, EventArgs e) { lblmsg.Visible = true; lblms...

How can I get a list of child processes for a given sevice in C#?

I have a service which creates a number of child processes. Using c# I need to determine the number of these child processes which are currently running. For example I have a service running called "TheService". This spawns 5 child processes, all called "process.exe". Is it possible to determine the number of child processes running und...

How to retrieve the time spent in user mode in a win32 process.

I know that GetProcessTimes can be used to retrieve the time a process spent in user mode (as opposed to the time it spent in kernel mode or the time it was suspended). Unfortunately, it seems that the resolution is only 16ms (the same as GetTickCount). Is there a way to retrieve the time with greater precision? ...

Return value of process

How can I get the return value of a process? Basically I'm ShellExecute()ing a .NET process from a DLL (in C++). The process does its task, but now I want to know whether it succeeded or failed. How to do that in WinAPI or MFC? ...

Should I verify an email address when a user registers on my website?

I have a membership site in beta right now... At the moment, when a user registers, it marks the account as unverified and sends them an email with a link to verify their account. The real reason for doing this is to make sure they entered their valid email address correctly. So I was contemplating on removing the verification step to ...

Is java Runtime.exec(String[]) platform independent?

I had some code that ran commands through Runtime.getRuntime.exec(String), and it worked on Windows. When I moved the code to Linux, it broke, and the only way of fixing it was to switch to the exec(String[]) version. If I leave things this way, will the code work the same on Windows and Linux, or should I use the exec(String) on Windows...

How do I programmatically disconnect an OpenVPN connection?

I am creating a WinForms application to start and stop an OpenVPN connection on Windows. I am trying to achieve the same functionality as OpenVPN GUI for Windows (http://openvpn.se/) provides but using my own .NET based UI. I am starting the connection using the following approach: Process openVpnProcess = new Process(); openVpnProcess...

An algorithm for estimating the runtime for a program

I need to find the total timings for the execution of a program over different inputs. The program reads some data and writes it into another file. The values of the data value and the size of the data are different every time. I want to find how long it will take in general for all size of data. Is the algorithm for finding this base...

x264 process stops working no matter on anything

Hi, i have made my video encoder. well very simple one and my process stops working after it gets to certain percent. Is there anything i could do to make it work? Is there some memory limitation? Could i run it somehow different? ...

How to hide cmd window while running a batch file?

How to hide cmd window while running a batch file? I use the following code to run batch file process = new Process(); process.StartInfo.FileName = batchFilePath; process.Start(); ...

Mounting and untar'ing a file in Java

Hello all, I'm currently working on a web application that involves mounting a drive and extracting a tar.gz file, all in Java. Since the application runs in a linux environment, I figured I'd try using unix commands like "mount" and "tar". Runtime runtime = Runtime.getRuntime(); Process proc; String mountCommand = "mount -t cifs -o u...

Start a new process in a transaction

Hi, I have to create a user in a third party application that stores its information in SQL Server, and I also store information about this user in our application database, also in SQL Server. I was hoping to wrap both updates in a TransactionScope, so they can succeed or rollback together. Unfortunately the only method I have for cre...

How can I kill a process based on the version number of its .EXE file?

I want to find a process that belongs to a .EXE file with a specific file version number, and kill it. How can I do that? I am working with Delphi, but any general help would be appreciated. ...