process

C# and .NET 3.5 - How to launch a process using different credentials, with a hidden window, and being able to capture standard output and exit code?

笑着哭i 提交于 2020-01-13 13:11:09
问题 I have a Windows Service developed in C# and .NET 3.5 to perform various administrative tasks throughout our 3 domains. I've got an admin account in each domain that has the necessary rights/permissions for what this service is doing. For all the AD interactions, I can bind to AD using the correct username/password for the domain and all is good. However, I have a need now to launch an external process (robocopy) to perform some work and I cannot find any code examples anywhere for doing this

Processes hang on read

拈花ヽ惹草 提交于 2020-01-13 13:10:21
问题 The following code reads messages from other processes through a pipe. All processes correctly print out all the messages, but then they will never proceed past the while loop. Tried debugging in Eclipse, after reading reading all the messages, it will just stop at that while loop. The index is a number assigned to each process. The first process would have index == 0. The message itself is simply the index of the process sending the message. while((n = read(fd[index][0], &mymsg, sizeof(int))

C# and .NET 3.5 - How to launch a process using different credentials, with a hidden window, and being able to capture standard output and exit code?

爷,独闯天下 提交于 2020-01-13 13:08:34
问题 I have a Windows Service developed in C# and .NET 3.5 to perform various administrative tasks throughout our 3 domains. I've got an admin account in each domain that has the necessary rights/permissions for what this service is doing. For all the AD interactions, I can bind to AD using the correct username/password for the domain and all is good. However, I have a need now to launch an external process (robocopy) to perform some work and I cannot find any code examples anywhere for doing this

C++ Process Management [closed]

半城伤御伤魂 提交于 2020-01-13 11:15:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 months ago . Is there a well-known, portable, good library for C++ process management? I found a promising library called Boost.Process, but it's only a candidate for inclusion in the Boost library. Has anyone use this? Does anyone know why it isn't a part of Boost? 回答1: How much management do you need? Just fork/exec? IPC?

Share variable through ruby processes

久未见 提交于 2020-01-13 10:12:32
问题 I'm writing a gem, where I have to fork two processes which are starting two webrick servers. I want to start this servers through a class method from a base class, because there should only be this two servers running, not multiple ones. During runtime, I want to call some methods on this two servers to change variables. My problem is, that I can't access the instance variables of the forks, through a class method of the base class. Furthermore, I can't use threads inside my base class,

Share variable through ruby processes

这一生的挚爱 提交于 2020-01-13 10:11:19
问题 I'm writing a gem, where I have to fork two processes which are starting two webrick servers. I want to start this servers through a class method from a base class, because there should only be this two servers running, not multiple ones. During runtime, I want to call some methods on this two servers to change variables. My problem is, that I can't access the instance variables of the forks, through a class method of the base class. Furthermore, I can't use threads inside my base class,

Get All DLLS For A Process

筅森魡賤 提交于 2020-01-13 09:25:10
问题 I would like to get a list of all the dlls loaded for a given Process. I am currently using .NET Framework 4.0 . I am aware that there is a bug when trying to access all managed dlls through the Process.Modules property. (Only lists the unmanaged dlls). I need a way to programmatically retrieve all of these dlls. Process[] myProcess = Process.GetProcessesByName("MyProcess"); if(myProcess.Count() > 0) { foreach (ProcessModule processModule in myProcess[0].Modules) //get information } EDIT: The

How to disable Open file – Security warning

安稳与你 提交于 2020-01-13 09:22:11
问题 I have a weird question. I have written a winform server application and a winform client application. The role of the client is to send commands for running a certain script to the server. The server receives those commands, parses them, and runs them. These two work great. I have written a cmd application which uses some of the functions from my client. This application is supposed to function as a cmd client. The question is this: When I run the winform client, the server runs the commands

AMQP Delay Delivery and Prevent Duplicate Messages

巧了我就是萌 提交于 2020-01-13 04:40:27
问题 I have a system that will generate messages sporadically, and I would like to only submit either zero or one message every 5 minutes. If no message is generated, nothing would be processed by the queue consumer. If a hundred identical messages are generated within 5 minutes I only want one of those to be consumed from the queue. I am using AMQP(RabbitMQ), is there a way to accomplish this within rabbitmq or the AMQP protocol? Can I inspect a queue's contents to ensure that I don't insert a

Android application doesn't close after calling System.exit(0)

耗尽温柔 提交于 2020-01-13 03:29:12
问题 I have an Android app that worked great, before I've added admob activity. I'm closing my app with killing process (calling System.exit(0)). I know that this is the worst solution of finishing the app. I'm working with OpenGL states and libgdx framefork, so I can't fixed all memory leak that appear when I'm calling standard android finish() function. So here's the problem: My app works normally several times. I close and start it again and again. All works fine, but suddenly admob view doesn