Questions tagged [system-shutdown]

Shutting down the current operating system. This may power down the physical hardware but may also just inactivate a virtual machine.

102 questions
4
votes
1 answer

NOT prevent windows from shutting down OnCloseQuery

I have an application that hides itself on closing by the red cross. User can exit it by right-clicking tray icon and choosing Exit. But it would apparently block windows from shutting down, so I made a procedure to respond to a WM_QUERYENDSESSION…
Martin Melka
  • 5,854
  • 10
  • 60
  • 114
4
votes
1 answer

filesystem are unmounted before the services are stopped in systemd

I am debugging systemd shutdown issue. Here the problem is some of the filesystems are unmounted while the services are still running. In general, we want systemd to shutdown the services first and then umount the mount points. But here, umount and…
sandeep nagendra
  • 370
  • 4
  • 13
4
votes
2 answers

Fast system shutdown in Python

I'm designing a piece of electronic hardware that may come into contact with water if there is a mechanical malfunction (e.g. a seal breaks). Inside the device, I have moisture sensors around all critical areas. I've already written a script that…
M. Bedross
  • 99
  • 1
  • 1
  • 12
4
votes
1 answer

How to write a program that stops the shutdown process by C?

Programs like Notepad can stop the computer shutdown process when files are not saved. How can I write a program that stops the shutdown process (in C)?
Fries
  • 319
  • 1
  • 4
  • 10
4
votes
1 answer

How can I shut down Windows?

How can I in a Delphi application (7, trying to port it to 2010) force the system (XP or 7) to shut down?
herman
  • 41
  • 1
  • 2
4
votes
2 answers

How to pause Windows shutdown

I need to mute/un-mute the sound card at startup and shutdown. I have found some code to do the work, but often Windows slams through the shutdown and the sound never gets muted. Can someone please tell me how to pause the shutdown long enough for…
user2175495
3
votes
1 answer

logging the windows shutdown sequence operations

we're working on a hardware platform that freezes during windows shutdown. I'd like to be able to log what's happening (e.g. to identify if there's a problem with ACPI, or a windows driver etc). What tools can I use to log the windows shutdown…
user206705
3
votes
1 answer

Shutdown computer, how operating systems achieve it? (C Kernel development)

I've been developing an OS lately in C. But how can I shutdown the computer? By saying 'shutdown the computer', I mean a force shutdown. How can I do that in C kernel development? Any help would be appreciated.
FastDeveloper
  • 343
  • 2
  • 10
3
votes
2 answers

C# Application not exiting on Shutdown (sometimes)

My application prevents windows shutting down, but only on some computers, and not all the time. Its a little tricky to debug. I think its due to my TCP server. It is an asynchronous server, and my application handles the CloseReason ==…
Simon
  • 8,517
  • 13
  • 64
  • 107
3
votes
3 answers

Detecting windows shutdown event

I have a windows Service always running once PC started, how would i detect using .NET 3.5 or WMI, when the user or some other application/process has requested a shutdown or reboot in windows. I do not want to stop it, just log the time and who…
Khalid Rahaman
  • 2,134
  • 3
  • 26
  • 38
3
votes
1 answer

How to call stop scripts on BusyBox shutdown?

I'm running BusyBox with an entry in /etc/inittab ::sysinit:/etc/init.d/rcS The rcS script calls all the start scripts in /etc/rc.d/ on startup. How is it possible to tell the BusyBox init to shut down all services probably by calling /etc/rc.d/xxx…
Manuel Barbe
  • 1,981
  • 13
  • 20
2
votes
0 answers

Problem when my system closes suddenly with Ubuntu 18.04 and QT Creator and C++

I´m developing a Ubuntu application with QT Creator in c++ language and i have a problem when my system shutdowns suddenly. I´m constantly modifying some files and when my system shutdowns doesn´t save the last changes but it add several "0" chars…
2
votes
0 answers

delphi windowless shutdown detect

I'm writing a very simple Delphi 2007 program that monitors system activities. The program just hooks a DLL procedure and has to simply wait until the system shutsdown since all the handling is done in the DLL callback. Is a windowless program since…
alvaroc
  • 362
  • 2
  • 14
2
votes
1 answer

Does android mobile has any error log file to debug cause for auto switch off?

Sometimes we see the device restarts automatically, while few other times I had found it switching off after long time, even battery was not low. So if we want to trace back of what actually has caused this, does we have any log file in device…
Pritam
  • 2,147
  • 5
  • 33
  • 50
2
votes
1 answer

Detect media player playing via cmd

How can I detect if a media player has stopped playing? Please answer for Windows Media Player. I need it to detect via cmd\bat. All I need to do is close Windows Media Player after playing a playlist. so far i have: start wmplayer.exe /play…
TechnoCraft
  • 113
  • 1
  • 5