From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261155AbTD1Oam (ORCPT ); Mon, 28 Apr 2003 10:30:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261160AbTD1Oam (ORCPT ); Mon, 28 Apr 2003 10:30:42 -0400 Received: from ns.suse.de ([213.95.15.193]:40709 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S261155AbTD1Oak (ORCPT ); Mon, 28 Apr 2003 10:30:40 -0400 To: root@chaos.analogic.com Cc: Mark Grosberg , Linux kernel Subject: Re: [RFD] Combined fork-exec syscall. X-Yow: Yow! STYROFOAM.. From: Andreas Schwab Date: Mon, 28 Apr 2003 16:42:55 +0200 In-Reply-To: (Richard B. Johnson's message of "Mon, 28 Apr 2003 10:16:21 -0400 (EDT)") Message-ID: User-Agent: Gnus/5.090018 (Oort Gnus v0.18) Emacs/21.3.50 (gnu/linux) References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org "Richard B. Johnson" writes: |> On Mon, 28 Apr 2003, Andreas Schwab wrote: |> |> > "Richard B. Johnson" writes: |> > |> > |> On Mon, 28 Apr 2003, Andreas Schwab wrote: |> > |> |> > |> > "Richard B. Johnson" writes: |> > |> > |> > |> > |> The following is a "simple popem()', about as minimal as |> > |> > |> you can get and have it work. |> > |> > |> > |> > Except it doesn't. |> > |> > |> > |> > |> i = 0; |> > |> > |> args[i++] = "/bin/sh"; |> > |> > |> args[i++] = "-c"; |> > |> > |> args[i++] = strtok((char *)command, " "); |> > |> > |> for(; i< NR_ARGS; i++) |> > |> > |> if((args[i] = strtok(NULL, " ")) == NULL) |> > |> > |> break; |> > |> |> > |> Yes it does. |> > |> > $ sh -c echo a b c |> > |> > $ sh -c 'echo a b c' |> > a b c |> > |> > Not what I call working. |> > |> > Andreas. |> |> Read the bash documentation `man bash`. Read the popen documentation 'man popen'. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."