Article View: es.comp.os.linux.programacion
Article #18537Re: Proceso se inicia en background
From: J.A. Gutierrez
Date: Wed, 01 Sep 1999 00:00
Date: Wed, 01 Sep 1999 00:00
26 lines
1469 bytes
1469 bytes
*puntero_loco <jajs@spamnoretemail.es> wrote:
: �Como se hace? (en C) para que un proceso se sit�e en background al empezar a
: ejecutarse?
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main(int argc, char **argv, char **envp)
{
if (fork())
{
exit(0);
}
printf("%d\n",getpid());
sleep( atol( argv[1] ));
exit(0);
}
--
PGP and other useless info at \ Oh, show us the way
http://www.cps.unizar.es/~spd/ \ to the next whisky bar
finger://daphne.cps.unizar.es/spd \ Weill/Bretch
Lo que si que es cierto es que la felicidad no da el dinero...
Technical Details
Message-ID:
<7qj6i4$9a9$3@celes.unizar.es>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<qkqup7.j9.ln@JuAnJuX>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f86c8,311b9b7a474eff74
X-Google-Attributes: gidf86c8,public
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Subject: Re: Proceso se inicia en background
Date: 1999/09/01
Message-ID: <7qj6i4$9a9$3@celes.unizar.es>
X-Deja-AN: 519712931
Content-Transfer-Encoding: 8bit
References: <qkqup7.j9.ln@JuAnJuX>
Content-Type: text/plain; charset=ISO-8859-1
X-Complaints-To: usenet@news.unizar.es
X-Trace: celes.unizar.es 936189316 9545 155.210.29.12 (1 Sep 1999 12:35:16 GMT)
Organization: Rank
Mime-Version: 1.0
User-Agent: tin/pre-1.4-19990413 ("Endemoniada") (UNIX) (IRIX/6.2 (IP22))
NNTP-Posting-Date: 1 Sep 1999 12:35:16 GMT
Newsgroups: es.comp.os.linux.programacion