Questions tagged [shutdown]

This refers to the process where the system state is systematically (and preferably gracefully) changed to the fully inactive state. Usually applied to complex systems, such as database, server program, operating system, virtual machine, physical computer and the like. Bypassing the shutdown procedure (immediate termination) may cause data loss or other problems.

This refers to the process where the system state is systematically (and preferably gracefully) changed to the fully inactive state.

Usually applied to complex systems, such as database, server program, operating system, virtual machine, physical computer and the like.

Bypassing the shutdown procedure (immediate termination) may cause data loss or other problems. Once the shutdown sequence has begun it can usually be stopped only by invoking the halt method, which forcibly terminates the system.

1261 questions
681
votes
10 answers

How do I shutdown, restart, or log off Windows via a bat file?

I've been using Remote Desktop Connection to get into a workstation. But in this environment, I cannot use the power options in Start Menu. I need an alternative way to shutdown or restart. How do I control my computer's power state through the…
Keng
  • 52,011
  • 32
  • 81
  • 111
562
votes
19 answers

How do I exit a WPF application programmatically?

How is one supposed to exit an application such as when the user clicks on the Exit menu item from the File menu? I have tried: this.Dispose(); this.Exit(); Application.ShutDown(); Application.Exit(); Application.Dispose(); Among many others.…
anon271334
156
votes
17 answers

How to shut down the computer from C#

What's the best way to shut down the computer from a C# program? I've found a few methods that work - I'll post them below - but none of them are very elegant. I'm looking for something that's simpler and natively .net.
roomaroo
  • 5,831
  • 4
  • 31
  • 31
102
votes
3 answers

How can I get the Windows last reboot reason

I'd like to know what is the Windows API function (if any exists) that provides information about the last Windows reboot source. There are three main possible causes: The computer crashed on a blue screen A user or a program shutdown/restarted the…
Frederic
  • 2,034
  • 3
  • 18
  • 22
89
votes
14 answers

Android Service Stops When App Is Closed

I am starting a service from my main Android activity as follows: final Context context = base.getApplicationContext(); final Intent intent = new Intent(context, MyService.class); startService(intent); When I close the activity page by swiping it…
Bam
  • 1,183
  • 1
  • 9
  • 13
71
votes
9 answers

Shutting down a computer

Is there a way to shutdown a computer using a built-in Java method?
jjnguy
  • 136,852
  • 53
  • 295
  • 323
61
votes
4 answers

How can I run a Perl script as a system daemon in linux?

What's a simple way to get a Perl script to run as a daemon in linux? Currently, this is on CentOS. I'd want it to start up with the system and shutdown with the system, so some /etc/rc.d/init.d integration would also be nice, but I could always add…
jedihawk
  • 814
  • 1
  • 12
  • 12
57
votes
7 answers

How to get shutdown hook to execute on a process launched from Eclipse

I have a shutdown hook in my application (created using Runtime.getRuntime().addShutdownHook). However if I launch the application from within Eclipse, when it is shut-down the shutdown hook doesn't execute. I think this is because Eclipse sends…
Neil
56
votes
3 answers

How to shutdown an ExecutorService?

Whenever I call shutdownNow() or shutdown() it doesn't shut down. I read of a few threads where it said that shutting down is not guaranteed - can someone provide me a good way of doing it?
rosesr
  • 749
  • 1
  • 7
  • 10
53
votes
5 answers

How to simulate Windows shutdown for debugging?

I have an issue with my application when Windows shuts down - my app isn't exiting nicely, resulting in the End Task window being displayed. How can I use the debugger to see what's going on? Is there a way to send the Windows shutdown message(s)…
Rory
  • 40,559
  • 52
  • 175
  • 261
51
votes
17 answers

Stop MySQL service windows

I am developing a website and need to refresh data. Therefore MySQL must be stopped. How can I stop the service? When I look at control panel services it is started without stop or restart option.
jop
  • 617
  • 1
  • 6
  • 6
49
votes
3 answers

App shutdown with EXC_RESOURCE, WAKEUPS exception on iOS 8 GM

Does anyone know what this kind of exception is on iOS 8? === from crash report === Exception Type: EXC_RESOURCE Exception Subtype: WAKEUPS Exception Message: (Limit 150/sec) Observed 206/sec over 300 secs Triggered by Thread: 14 Seems to only…
Coder
  • 491
  • 1
  • 4
  • 3
46
votes
4 answers

How to cancel 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…
David
  • 17,673
  • 10
  • 68
  • 97
46
votes
17 answers

Android emulator won't shut down

The emulator starts up fine. But when you long-press the power button (or F7) and choose "Power off", it displays a "Shutting down" message which remains on-screen forever and the emulator won't actually shut down. I can close the emulator window or…
Cyker
  • 9,946
  • 8
  • 65
  • 93
43
votes
6 answers

How do I shutdown JBoss AS 7 server?

I recently updated from jboss-as.7.1.0.CR1b to jboss-as.7.1.0.Final and want to shutdown running instance from the console. In previous versions the command $JBOSS_HOME/bin/jboss-admin.sh --connect command=:shutdown was available, but I do not see…
Thor
  • 6,607
  • 13
  • 62
  • 96
1
2 3
84 85