From owner-freebsd-questions Sun Jul 8 9:43: 3 2001 Delivered-To: freebsd-questions@freebsd.org Received: from beta.root-servers.ch (gamma.root-servers.ch [195.49.62.126]) by hub.freebsd.org (Postfix) with SMTP id E3E9A37B401 for ; Sun, 8 Jul 2001 09:42:59 -0700 (PDT) (envelope-from gabriel_ambuehl@buz.ch) Received: (qmail 70042 invoked from network); 8 Jul 2001 16:42:59 -0000 Received: from dclient106-17.hispeed.ch (HELO athlon550) (62.2.106.17) by beta.root-servers.ch with SMTP; 8 Jul 2001 16:42:59 -0000 Date: Sun, 8 Jul 2001 18:43:58 +0200 From: Gabriel Ambuehl X-Mailer: The Bat! (v1.53bis) Educational Organization: BUZ Internet Services X-Priority: 3 (Normal) Message-ID: <25598232302.20010708184358@buz.ch> To: David Leimbach Cc: freebsd-questions@freebsd.org Subject: Re[2]: Passing data in C++ via stdin without waiting for the new process to complete In-Reply-To: <20010708104552.C5630@mutt.home.net> References: <114577608557.20010708130014@buz.ch> <3B484403.1BA9A21D@jak.nl> <84594262844.20010708173749@buz.ch> <20010708104552.C5630@mutt.home.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG -----BEGIN PGP SIGNED MESSAGE----- Hello David, Sunday, July 08, 2001, 5:45:52 PM, you wrote: >> spawned, no matter how long it takes the child to complete. > They don't block the parent... they overwrite the current. > int main () { > pid_t pid = fork(); > if (!pid) { > //in child > execl(...); //do something else > } > else { > //in parent code > } > There is NO BLOCKING!!!! Hmm. I must have misunderstood something last night... One should resist the temptation to code while drinking beer ;-). Need to have some thoughts about my general architecture now as for some stuff, integrating the external executables into the master daemon to be run as threads should actually work and it would result in a dramatically faster execution than any fork()/exec() model would ever do.... Thanks for all the replies, anyway. Best regards, Gabriel n -----BEGIN PGP SIGNATURE----- Version: PGP 6.5i iQEVAwUBO0h/wcZa2WpymlDxAQG61wf9FZEQLyzBdg4fGAu4KLlums00v6SYeODL x+LksYuCKMYTeF/AOGQn3x4CZUQb8g+0SJewXK+ARKX9ErWioPcXriAa+ZxXDIF8 /qlTCHMnfXErhoUIq4a0tNhIMC+IA1ywb+C8BMSxtgTQfZg92Jntt4VB7+Zcy+Kl cVGVHaTQuQpKPbZ+6NOTRpu8JxTolD+B99jNgEJ55zUJyuIO/pCuV1++7BUdPURN esjwvm8upQDZpMEYnA+VRb0p6KdjsYuUPJlnpuxxPb2LCK27mCqJXWflksGgrAP9 VY5mqXpOVsOMKoRNKZWU+0m763PSTd8094sf9ABnb/sa1d0SZ5VWXA== =mKFK -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message