From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id B3A0623F6C for ; Mon, 3 Jun 2024 16:51:47 +0200 (CEST) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1717426307; b=Yq5qKTq9GyhbROYHiqPTPAnJFtaAplEpGOP6rEW3Ajk6urDGid97S2h4aADqJQRvTbNw/94itF Q2DGubnETavADEny1aaCcBjM0klmTRV4AOC5A4o++tL/28rTKVTRZ9ptmoi8gV/YtyYzfjhWOD a8LFF9YZYVDXvb7uY6rsAYzwghG9l98gPE8dPQhMkUNGTFbfazFTBWOAjCCj6c78pIHG3VBdl5 IVMSPUB7Y7pEhEgkjZ1D4e2XcAHo7jx/tQIKUuCPFcY/XlQu6EOV17NlpLxdq8rHGg8JRrHwDq 276f5fgwWgQ5khC0OJXpPbDpFdiweD9pV0W5v2YWajriyQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mout.gmx.net) smtp.remote-ip=212.227.17.21; dkim=pass header.d=gmx.com header.i=llua@gmx.com header.s=s31663417 header.a=rsa-sha256; dmarc=pass header.from=gmx.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1717426307; bh=EvXw2gSl61cvFxmgQg00HJPTCjiHTNLiFeI3bdGrFts=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:To:Subject:MIME-Version:Date:Message-ID:DKIM-Signature: DKIM-Signature; b=AYYfQhg60uAQhcjMKf23CMbMVm30IZMjjBGFlZN2rpidAR+/cRkpFYk9qDlDdjSfbiBqlwlNXD ItC2XyrswiJgL8FCvZR+hRowanrKLQx8nwhHZQAluZwIaY4P8J1EB6I4XnvkB+aW5C+G9Jb9IS l/tTsBjCqTbXDLc8dMYQEoJgcyjYygFCd2PczDLr62HWlQZQYnARK0Sva8OUtHaMA3/N41uqGO NN44cJafDBOIxIfIaV2y0COGTFndb9ypGfS2QoKJLjLg42JmbFs3tSzRe5iLGN5/h0HUGQT5T2 8R+Z0zyLLsqYj5b7L+XgJLpbVyO/6mYLk3ixvJYXDXnJLA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=JPy8Wd4VsF+rR9NiJBKZahdVDb+fMrRE7mdn2s2uP2c=; b=ncjjgjXQ2n3xSFFGY/PWQKBeT+ w9CW3+AwPRJ1K5PPVMwrzow69y+HtJp5PCvjX9E/gueRRfmUZShRSa3NNkidopX/8ZUzsJbiAmkVp nZVk9vcgBFpBZcZSOs+WYnX4z0DK4d15zTJRYotIgjARzFU0bXwEl1FNDO3z2ZbKXRsiOOqJuO+Ok Abfrhe60jKXd5LWskLszEKZFnrMkK7sixIIkNWD8cWFG3GRvwfHlhM8OSGyEBMqYR6uvA/WeaUpwe otM+OrQMYA71rpF5VnaR9iRZMyrNSJtJm96IGe9maSXPAmPRvuxWuh6R2hnVp68CYR6dCjYBAi0AN h6NCTmWg==; Received: by zero.zsh.org with local id 1sE92J-0002hJ-7g; Mon, 03 Jun 2024 14:51:47 +0000 Authentication-Results: zsh.org; iprev=pass (mout.gmx.net) smtp.remote-ip=212.227.17.21; dkim=pass header.d=gmx.com header.i=llua@gmx.com header.s=s31663417 header.a=rsa-sha256; dmarc=pass header.from=gmx.com; arc=none Received: from mout.gmx.net ([212.227.17.21]:59095) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1sE91I-0001xD-8e; Mon, 03 Jun 2024 14:50:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.com; s=s31663417; t=1717426243; x=1718031043; i=llua@gmx.com; bh=JPy8Wd4VsF+rR9NiJBKZahdVDb+fMrRE7mdn2s2uP2c=; h=X-UI-Sender-Class:Message-ID:Date:MIME-Version:Subject:To: References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=sEVcZyMG8EyMn2EY/WEzhuxh/q+OAUPUoYQf64Gv3yFdxtSYGqWRk5vboGsjk6Xq 5eQrRCMBnpqmbyGXdxgU6FHeKHB8GGxNv6fWyrm4BFU/MKIKNQPmZf5rUIxnufMtJ NfQTOsOPxptRG1QoTw59aibKGVXDgw0dBiIG+cHxj9vlQIg9ji8OBtFSK+SIUzv3T yT9x7Jd+MPE539LtO9HQvqQpv/oJUNqek01RYi6fysbDAUPLP7P4udUoNqO6ulOe6 guPdCTB0puxmNBvNLACQ/ZG7iNDFrZS5B8seFNpL0avh2Xm57f7iLACKYqwod+nII Xsf55uW7e5MB6MX+Zg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [10.0.0.14] ([67.177.154.237]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1N5mKJ-1sY1ZA1YMd-015r52 for ; Mon, 03 Jun 2024 16:50:43 +0200 Message-ID: Date: Mon, 3 Jun 2024 10:50:42 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: exec To: zsh-users@zsh.org References: <2bb9cec5-1293-4103-a73c-fd2a190cb65d@eastlink.ca> Content-Language: en-US From: Eric Cook In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:zVLavO5CwOfmW9KknLHEJi/hXwYbbsU5OE/UC1RyqN/fw1MHEWu vQujlY9xYdJdFyYrsB4nGVDVGxMv8uOKTAzxUd+mk7gaXIaIGzH7daXmFQip/VDbZ1sCWaB YOE8jvTpDs9pFhwgCN4nmX1Q6rviBX+cEmlaTXCyCIsxj4gSYUVmyNzIreRsWAZ9wUHrLJx zGEz5BgCu5XygrjQyIy+A== UI-OutboundReport: notjunk:1;M01:P0:5qtBpGTQ5IY=;dXTPUqeZHOhP9E5V7hOQFA92fDp u00yu8BGYhHXYvBGvI8+xrmeL2MSoGFpYrmdNjcE3A+0fgVDMb55pFC5fivCMOfBgiBXpD0IH NO3YpK8fEiEsnyi0wSTG11BlL2QtTACRNCLevwz9J5sK8PEQNciolrAuyLC6NEO4Ss2aMUt5u 4er1vYiQDJhgZBKn++s1YTIZUXqpWdCsuRhAB6/+e35HxeomghumlBVmSU/Pya8klzKlexLQT LbFV1IYvI8lc7WLeUZjR9SAdx+ie3CHpXBF3SfeILotYtNrOtbLecpg2ZClQnvfGffTUI8Rtt RIlu4n/MM6kU76Yx2gpM6c4+CoiVrzJC69ifL0Qox6vAfKa6aXqSGzvRjtVeFaaEr0E4BA6np P9T4aceWTs/GtRjmmu4Lf73Y8cngRUXGWnYM3cxVUZnJqKe/iHuFNkqmHFsalurTpukz/smoI Vd0u7SQ5oKY7tBoogtF0+GcfeRr3hZs8iIzW/tbocieiTrTMcXC+CzICr04xlQ95CaF7SmRkH x3gQMEJXoekO54VB8x88e6jlZ1QlDUQENiSx8QasXlo0FNCJ5BXtMQObUfz5Nqs18R4lbzRZH /OMziHp1MnIiUghJepX166P4zFc5yCwtVpcbmOJuib3LMOXbdsfr/22AmNqdBmAwKi5axBrYU ELEydmYb3n1h5Uc837EadihUYg59COs5PfS/sr5TBlvOi49uvB6xFQyLUQjhgm/f036xGyQBI nCFLMddNwjGBhtGfuI3Nng+pJsnjt3S+A6li3k6YhT0j15xl0kiOzxPa7AOKFqlVjpXtS9lQW xi8nDMap+fW2guY1Zx7pkLxbdVFu0s/HOa9m7IC5xMpJo= X-Seq: 29982 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On 6/3/24 10:42 AM, Ray Andrews wrote: > > > On 2024-06-03 07:17, Mark J. Reed wrote: >> The *exec*=C2=A0builtin replaces the running shell with whatever progra= m you run.=C2=A0 The point is to avoid clogging the process table with she= lls that are just hanging out waiting to do nothing but exit as soon as th= eir child process finishes. > I get that. > >> >> In your case, the script exists to set things up in the environment and= then run xfce4-session; there's nothing for it to do after xfce4-session = completes, so it uses *exec*=C2=A0to tidy up. > > Sure.=C2=A0 But then what? nothing, the process was replaced with xfce-session. I understand that if a script or function has nothing more to do, it may= as well pre-kill itself. But the difference is that 'exec' kills the enti= re terminal, it doesn't just return to the prompt in a more efficient way How would it return to the prompt of a shell/process that was replaced wit= h another process? when you have a `terminal -> shell' and you run exit/^D the terminal no lo= nger has a child process and exits. when you have a `terminal -> shell that does exec -> utility' and utility = exits, the terminal no longer has a child process and exits.