Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ Compiling the server
➜ exit_code
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| MagicDuck
USA (7 posts) Bio
|
| Date
| Tue 07 Jan 2003 02:53 AM (UTC) |
| Message
| | If the server is being run as a service under win xp, can the exit_code from Win32_Exit be sent to a batch file errorlevel (or any other program) ? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,166 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Tue 07 Jan 2003 09:13 PM (UTC) |
| Message
| Not sure how this would work, as a service doesn't run from a batch file.
An alternative to services is to run under Cygwin and run as a detached process (eg. smaug &) however there is still the issue of reporting faults. Perhaps on a crash it could write out a file which wasn't there previously? |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
| Posted by
| MagicDuck
USA (7 posts) Bio
|
| Date
| Reply #2 on Thu 09 Jan 2003 09:05 PM (UTC) |
| Message
| Thanks for the idea, i thought of the same thing as well:
Actually, i was trying to make the reboot and shutdown commands both work properly, along with that (previously) annoying 6 am reboot, while at the same time running smaug as a service. I ended up adding a bit of code to Win32_Exit to create a "reboot.txt" every time the reboot command is given, and then getting a batch file to run the whole thing. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,166 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Thu 09 Jan 2003 11:14 PM (UTC) |
| Message
| | I did write a small script a while back with a small supporting program, that tested if the server was up and if not, restarted it. You could adapt that too to allow for crashes. The script/program is in the downloads area somewhere, maybe in the utilities section. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
13,683 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top