public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Oleksandr Gavenko <gavenkoa@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Setting env var CYGWIN for Cygwin service?
Date: Thu, 31 Dec 2020 17:20:03 +0200	[thread overview]
Message-ID: <vriur1n6ngt8.fsf@gavenkoa.example.com> (raw)
In-Reply-To: <rskbdc$15hh$1@ciao.gmane.io>

On 2020-12-31, Franz Fehringer via Cygwin wrote:

> Cygwin inherits Windows environment variables, this should be the simplest take.

Normally does, no doubt.

So I made `srv.c`:

  #include <unistd.h>
  int main() {
      sleep(60);
  }

compiled:

  gcc -o srv.exe srv.c

registered:

  cygrunsrv -I mysrv -t manual -p $PWD/srv.exe -c $PWD -e MY=hello -d "My Srv" -f "Testing Cyg Service"

  $ cygrunsrv -L
  exim
  mysrv

launched:

  cygrunsrv --start mysrv

Finally checked with Process Explorer:

* corresponding `cygrunsrv` had many env vars
* my `srv.exe` had only:

>    PATH
>    SYSTEMDRIVE
>    SYSTEMROOT
>    WINDIR

Same was for exim as I wrote earlier. `cygrunsrv` has everything, `exim` only
4 env vars.

  uname -r
  3.1.7(0.340/5/3)

-- 
http://defun.work/


  reply	other threads:[~2020-12-31 15:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 20:09 Oleksandr Gavenko
2020-12-31 11:07 ` Franz Fehringer
2020-12-31 15:20   ` Oleksandr Gavenko [this message]
2020-12-31 15:04 ` Bill Stewart
2020-12-31 15:41   ` Oleksandr Gavenko
2020-12-31 15:46   ` Brian Inglis
2021-01-04 22:08 ` Oleksandr Gavenko
2021-01-04 22:39   ` 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=vriur1n6ngt8.fsf@gavenkoa.example.com \
    --to=gavenkoa@gmail.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).