delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/15/11:42:02

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-Id: <4.3.1.2.20010115113218.0231b4b0@pop.ma.ultranet.com>
X-Sender: lhall AT pop DOT ma DOT ultranet DOT com
X-Mailer: QUALCOMM Windows Eudora Version 4.3.1
Date: Mon, 15 Jan 2001 11:35:27 -0500
To: Kaatunut <kaatunut AT iki DOT fi>, cygwin AT cygwin DOT com
From: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
Subject: Re: (detached) background (console) processes
In-Reply-To: <3A6314C4.F08C2845@iki.fi>
Mime-Version: 1.0

At 10:18 AM 1/15/2001, Kaatunut wrote:
>How do I create a console (well, actually, console-less) process that I
>can leave running at background- that is, no need for terminal? Under
>unix, I would just do
>
>if (fork()) { exit(0); }
>// I'm in background now
>
>but as I compile that on not-so-old gcc 2.95.2 on win32 (cygwin default
>compiler or whatever, not mingw32) and run it, the terminal won't detach
>and let me quit. And if I kill it, the child dies also.
>
>I tried searching archives but found nothing useful; however, from one
>post over two years old I got the impression I should have to
>detach something. How does this happen?
>
>  -Kaatunut



Take a look at the documentation for CreateProcess() in the MSDN and the
code in winsup/cygwin/fork.cc.  You should be able to figure out something
to do what you want from this.



Larry Hall                              lhall AT rfk DOT com
RFK Partners, Inc.                      http://www.rfk.com
118 Washington Street                   (508) 893-9779 - RFK Office
Holliston, MA 01746                     (508) 893-9889 - FAX



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019