Date: Sun, 8 Jul 2001 18:43:58 +0200 From: Gabriel Ambuehl <gabriel_ambuehl@buz.ch> To: David Leimbach <leimbacd@bellsouth.net> Cc: freebsd-questions@freebsd.org Subject: Re[2]: Passing data in C++ via stdin without waiting for the new process to complete Message-ID: <25598232302.20010708184358@buz.ch> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
-----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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25598232302.20010708184358>