Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3A6314C4.F08C2845@iki.fi>
Date: Mon, 15 Jan 2001 17:18:28 +0200
From: Kaatunut <kaatunut@iki.fi>
Organization: -
X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.12-20 i586)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: (detached) background (console) processes
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

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


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

