X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=b/uULVPyU7raaThE /mAMQWSwoXl+O8PG1RC0VlL7jHgmwkX9uhZ2QIsHjLWu8mMlfjH+E/lBYxsjBvJ3 HPGGKWlt+VSBE/BtvCDrjCZrzlrxxsErX3L6n8C8u9UePmOnemf0gxsD6EbptpvO hu5TWSvffVlAbPQKv1AP+7wCDzY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:reply-to:subject:to:references:from:message-id :date:mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=A8Pur2EPu+xqg5ov/Ph4rn pP5QU=; b=NLb3gDA86UbIYV0ndHQgNPe/e0gvvjVEI2ZcoW3X9bRT9TJ2SjwmOp vaKB8Q0QV28vxPByzocIwsD1k8G2+IOcZ29t1IPCektHFnSQ3fHzV/4yhISECfG0 qaShNk7qY/Wmaks6VcwXDDPCbGcza4Z1t92H9ggf0nxCoHtRUKAHM= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=jobs, scheduled, bounced, H*f:sk:BN7PR09 X-HELO: smtp-out-so.shaw.ca Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Subject: Re: cygrunsrv does not start cygsshd at boot To: cygwin AT cygwin DOT com References: From: Brian Inglis Message-ID: <313c4b5c-becb-81f3-f851-2181ba17100f@SystematicSw.ab.ca> Date: Wed, 29 Jan 2020 16:08:17 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 2020-01-29 11:55, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via cygwin wrote: >> Don't see where you read that? > > The service control manager waits until the service stops or the specified preshutdown time-out value expires (this value can be set with the ChangeServiceConfig2 function). This control code should be used only in special circumstances, because a service that handles this notification > > * blocks system shutdown * > > until the service stops or the preshutdown time-out interval expires. > >> Is that not better than abruptly terminating an sshd session, or abandoning sending a large email? > > Depends. When you are ready to reboot you usually don't have anything important running by then. You are viewing everything as a purely manual desktop user who has nothing important happening on their system and total control over restarts: most Home and work desktop users get updated and restarted with little interaction or option; servers are bounced by someone or some process elsewhere who thinks now is a good time; updates on my work systems always seemed to be applied as I logged on in response to urgent calls early, during lunchtime, or just when leaving for the day. I may well have scheduled tasks or cron jobs running, some of which may take a while to complete, unfortunately longer than 3 minutes: I can only hope those processes will not be killed and will defer the shutdown process, as on the next hourly run after restart, the missed processing will have to be caught up, before current processing starts. As some other posters noted recently, some package rebuilds take hours on their systems. > Also, emails "abandoned" while sending will be re-sent, in most decent mailers. > > Finally, when you do need the pre-shutdown option, you can specify it with cygrunsrv directly (-O, --preshutdown) > -- no need to deal with any manual registry changes. That is a service initial configuration option (stored in the registry) which that means on startup, the service will prepare itself to receive and handle Preshutdown messages, and the system may send such messages to the service. Note the sample cygrunsrv output showing "Controls Accepted: Stop, Preshutdown". -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. -- 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