halt

How do I write a program that tells when my other program ends?

How do I write a program that tells when my other program ends? ...

Possible to abort shutdown on Linux?

I'm familiar with and use shutdown in Linux, and typically just do > shutdown -h now But is there a way to stop shutdown from happening, say if I aim to shutdown 10 minutes from now and then in 5 minutes time I discover I really don't want to shut down? ...

Pause execution of a method without locking GUI. C#

I'm working on a card game in C# for a project on my Intro to OOP paper and have got the game working now but am adding "flair" to the GUI. Currently cards are dealt and appear on the UI instantaneously. I want to have to program pause for a moment after dealing a card before it deals the next. When a game is started the following code...

Getting a Process to terminate

I have a process object setup like the following: Process p = new Process(); p.StartInfo.FileName = command; p.StartInfo.UseShellExecute = true; p.StartInfo.Arguments = String.Format( commandArguments, destinationLocation, sourceLocation, sourceDirName, (string.IsNullOrEmpty(revisionNotes.Text)) ? "" : revisionNotes....

Calling sleep on current thread stalls my main GUI

I have one class DataThread inherited from Thread. I am using two DataThread objects ReadThread and WriteThread. I have another thread where Main_GUI is running. Now when I press a button on main_GUI it calls a method x.method1() and then this method uses the WriteThread method WriteThread.sleepForReset(). In public void sleepForReset...

WPF DoDragDrop causes control animation to halt

Here's the scenario (simplified): I have a control (let's say, a Rectangle) on the Window. I hooked the MouseMove event to make it initiate a drag&drop. Then in the MouseDown event I let it animate, moving 50 pixels to the right. However, when I hold my mouse down on the Rectangle, the control moves about one pixel, and then pauses. Only...

Problem with downloads: slow and/or fails

I have the following script to let a visitor download a file: header( 'Content-Type: application/octet-stream' ); header( 'Content-Transfer-Encoding: binary' ); header( 'Content-Disposition: attachment; filename=' . $fileName ); header( 'Content-Length: ' . filesize( $filePath ) ); header( 'Content-Description: Download' ); header( 'Cac...

Source code of the "halt" tool?

Can anyone link up the source of the halt tool? It is a binary usually located in /sbin which shuts down the system. I did some search and I couldn't find it anywhere. ...

How to return an error code with Halt(n) from an Exception block with D2007?

Update: It seems to be specific to D2007. It works in D2010 like it worked in older version. I would like to return an exit code depending on the type of Exception caught in the Eception Handler block like: program test; {$APPTYPE CONSOLE} uses SysUtils; var Exitcode: Integer; begin Writeln('Enter error code:'); Readln(Exi...