public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Bill Stewart <bstewart@iname.com>
To: cygwin@cygwin.com
Subject: Re: Windows Restart Manager and cygrunsrv services
Date: Mon, 27 Jan 2020 16:20:00 -0000	[thread overview]
Message-ID: <CANV9t=R_JcAT5V-+kj5FLbpQ5SMvd_fQKjHuVqJGwrhs5M598Q@mail.gmail.com> (raw)
In-Reply-To: <CANV9t=RWS9udBWsfETtKbVNfdkNJNht2qq7-KFTnRpFE2gmnFw@mail.gmail.com>

On Thu, Jan 23, 2020 at 10:44 AM Bill Stewart wrote:

> However it seems that when running a service using cygrunsrv, the
> Restart Manager RmGetList API[2] returns RmRebootReasonSessionMismatch
> (2) for the lpdwRebootReasons output parameter.
>
> This parameter return value is one of the RM_REBOOT_REASON enumeration
> values[3].
>
> The description for the RmRebootReasonSessionMismatch value on MSDN is
> as follows: "One or more processes are running in another Terminal
> Services session."
>
> I ran into this building an Inno Setup installer. I reproduced on
> Windows 10 x64 and Windows Server 2008 R2 x64.
>
> The error description is interesting, because in neither repro case
> were there other users logged on using TS sessions. (I'm not sure if
> that error description is completely accurate in describing all cases
> where that value gets returned, though...)
>
> Unexpected behavior: Restart Manager returns 2
> (RmRebootReasonSessionMismatch) in the lpdwRebootReasons output
> parameter when calling the RmGetList API to detect a cygrunsrv
> service.
>
> Expected behavior: Restart Manager should return 0
> (RmRebootReasonNone) in the lpdwRebootReasons output parameter when
> calling the RmGetList API to detect a cygrunsrv service.
>
> Further details (regarding Inno Setup and this problem):
> https://groups.google.com/d/msg/innosetup/9dAT3wB9RTQ/99Py-ZgLCgAJ
>
> Any ideas why Restart Manager doesn't work for cygrunsrv services?
>
> Thanks!
>
> Bill
>
> ____________________
>
> [1] https://docs.microsoft.com/en-us/windows/win32/rstmgr/about-restart-manager
>
> [2] https://docs.microsoft.com/en-us/windows/win32/api/restartmanager/nf-restartmanager-rmgetlist
>
> [3] https://docs.microsoft.com/en-us/windows/win32/api/restartmanager/ne-restartmanager-rm_reboot_reason

Question also posted on StackOverflow:

https://stackoverflow.com/questions/59902201/

Any insights appreciated.

Thanks!

Bill

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2020-01-27 16:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-23 17:44 Bill Stewart
2020-01-27 16:20 ` Bill Stewart [this message]
2020-01-27 22:24   ` Bill Stewart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CANV9t=R_JcAT5V-+kj5FLbpQ5SMvd_fQKjHuVqJGwrhs5M598Q@mail.gmail.com' \
    --to=bstewart@iname.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).