From owner-freebsd-hackers@FreeBSD.ORG Wed Nov 2 20:38:35 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62A0B106566B for ; Wed, 2 Nov 2011 20:38:35 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1FD7C8FC2C for ; Wed, 2 Nov 2011 20:38:34 +0000 (UTC) Received: by vcbfk26 with SMTP id fk26so833137vcb.13 for ; Wed, 02 Nov 2011 13:38:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ycejI3Jca0MoIwuKW9y06WC57KdYsZZtiqVJ+Zq0YqE=; b=IlggqTVtfIGLSfRn/CFAJ8kmDvkMKVs/d0a2SUKh/3tyLTVv2M+hwrYN401Gu2gjYT /NzkK9z73u2adoYcc+d+e2zrVTjYFhNWXrGtzrFIt8KhsEfea9o18S0puMmIEy+Tc5gG IeISqD4r4DzzMaNMzfjkPg6UAPospglQhCh/s= MIME-Version: 1.0 Received: by 10.182.31.43 with SMTP id x11mr1222440obh.26.1320266314331; Wed, 02 Nov 2011 13:38:34 -0700 (PDT) Received: by 10.182.122.33 with HTTP; Wed, 2 Nov 2011 13:38:34 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Nov 2011 13:38:34 -0700 Message-ID: From: Garrett Cooper To: Mark Saad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: What is going on with ash / sh X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2011 20:38:35 -0000 On Wed, Nov 2, 2011 at 1:37 PM, Garrett Cooper wrote: > On Wed, Nov 2, 2011 at 1:28 PM, Mark Saad wrote: >> Hackers >> =A0What is going on here, if I run the following shell script, what is >> the expected output . The script is named xxx >> >> #!/bin/sh >> ps -ax | grep -v grep | grep xxx >> >> Here is what I see >> >> >> =A0# sh xxx >> 88318 =A0p0 =A0S+ =A0 =A0 0:00.00 sh xxx >> 88320 =A0p0 =A0R+ =A0 =A0 0:00.00 sh xxx >> 88321 =A0p0 =A0R+ =A0 =A0 0:00.00 sh xxx > > =A0 =A0No idea. jobs isn't a shell builtin so you can't verify what jobs > are currently running via the shell if there are any. What version of > FreeBSD are you using and what do your $ENV and .profile files look > like? Also, psauxww | grep -v grep | grep xxx would help. I would wait for a reply from Jilles, because it might be creating a subshell for each instance. -Garrett