From owner-freebsd-questions@freebsd.org Fri Oct 28 03:48:37 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94260C21472 for ; Fri, 28 Oct 2016 03:48:37 +0000 (UTC) (envelope-from citrin+bsd@citrin.ru) Received: from hz.citrin.ru (hz.citrin.ru [IPv6:2a01:4f8:d16:10c3::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B9FD684 for ; Fri, 28 Oct 2016 03:48:37 +0000 (UTC) (envelope-from citrin+bsd@citrin.ru) Received: from x220.lan (c-24-60-168-172.hsd1.ct.comcast.net [24.60.168.172]) by hz.citrin.ru (Postfix) with ESMTPSA id F085228A5C2 for ; Fri, 28 Oct 2016 03:48:31 +0000 (UTC) Subject: Re: Interesting $0 Problem To: freebsd-questions@freebsd.org References: <20161028014923.GA11638@fedora24> <5812B617.5070701@gmail.com> <27078.128.135.52.6.1477621835.squirrel@cosmo.uchicago.edu> <20161028024041.GA93243@spectrum.skysmurf.nl> <2b1b598d-2ff1-2fa4-03d1-4771aa6f9c4d@tundraware.com> From: Anton Yuzhaninov Message-ID: <5b07633f-3241-27a5-15fc-1c138a3083d8@citrin.ru> Date: Thu, 27 Oct 2016 23:48:29 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <2b1b598d-2ff1-2fa4-03d1-4771aa6f9c4d@tundraware.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrin.ru; s=s0; t=1477626512; bh=rZQJHlDe8xNLelZB4ZpQn8UeihxPX+hzHTwBDHobtRY=; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=h6Jacq6fI1Zg1QaZDH9G5Xfm+PzCxrBp790MXE80tzrMdosPCXGTtnbMTAjihKdu1e9VpYAqK07D/W4itprDjx7BevPlBYbXT9ICZ7Kuacc8RKce1zYkwxoVSafQCH+DHdy5Ucthk0we40kIfZ7hUW9rFsWF8EQhzCnK1LrxraI= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2016 03:48:37 -0000 On 10/27/16 22:44, Tim Daneliuk wrote: > I've used *BSD for decades and this is a new one to me. I've never seen > this behavior anywhere else (like Linux). Do you have some sense of the > rationale' for this? It is very old Unix convention - argv[0] for login shells is prefixed by "-". From AT&T UNIX SRV2 (released in April, 1984): file /src/cmd/login.c char minusnam[16] = "-"; ... /* Generate the name of the shell with a '-' sign in front of it. */ /* This causes .profile processing when a shell is exec'ed. */ strcat(minusnam, namep);