From mboxrd@z Thu Jan 1 00:00:00 1970 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, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15386 invoked from network); 22 Oct 2023 19:01:00 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Oct 2023 19:01:00 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1698001260; b=oKOUdjS06E7eUD2FQR13gdNBIpkm9DGXuk+EFr5YX5nS4Yit6pVUsUKfoRVcMO1baXzxhZc+Dn 9KpaAEz2py+jO+PmlN3P9c6mbSBaptAV+Qpxcox1W8dnDvTCp35sRrSGOzmNaxRNh+rWMjJ/kB eznnPZijRxx78C4C8miARInYkMz53KrGRaJ4DEyGWyStDSCfQl42LdY0z91XbGkhF9iT+Ze5YQ SRlLRyl7Z357CiFUDWxsr3Z0zl2MhC2stTAovddhbwL2TskHBoLcG1b++tDOYa5yJOE3XFJqS5 rMpPCFyXz57yM0G3AFmwP/EJSuEOUImTYOBJAYZxQtMQ5w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f50.google.com) smtp.remote-ip=209.85.218.50; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1698001260; bh=qU0ARc0122uJXdSvGXynKOlCTou3UOca/Fvll6/q6tE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature: DKIM-Signature; b=G5cXdKiTrFkCMkJxzMVJXFP2MJVpKbH9iRR/sdzuOhMZzyxlmZ0DZwRQcb3RDt3Q73mwVGTT5/ PBvQCgkGKY1AkDBhiTWsEPmdK7BtrthqxxKu1r1GgM4wzbSevAbxhslg9F3utJOCY24/asX9so teBd5hXRaVN9cNdFiaM9HJg13xKFVNKK9CSxzZST9AzeqRiX3kiITMzPN8JGZyq/4NfGAdo7jT AiXYI18BoQefsU4D9cjON+HMXLZjfzc6fDJLpoh/cE/FPR+hjcxmNRAOsUDhfyVaT6XspY4pfD GEB7R97h7rTnL3iKuNXX951VtGWJq1R1BMvYQT4/ulF/PQ==; 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:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ZVQZobZOIiknpzywir5F6o46OwBYoszQu+ynxfDbLk4=; b=YeuByuz684fsqI2e9ScbfAhDGK vi0lM73IccA3wD9GXNI0XKTRKzeP24Sq/jRUSDKVnDSSNXBw9x4vxV9Y3z+aFemWnmEX85cKHnh5b Zh59m1Cc1fuApsqCk7Q5pBxacQAMOgCDvVRkPy2eKDYlkQMbFN7y+VBLu2uwYdoj4CeuqMoZSbkGV xxeGMKmQGhNKdgPJyxza3+rK7z/9JLS9+dSfdIN1WCw3Jb1sqMRHc7cbXYya1DMSYSp0dBC4OWnT3 6qc2K3TcLIlsGF2OheDW0qK1LoUX5YOS8UUqE3JBOuzb7lu1RSAtx/XYtx/87aL31GobJeL2jDZOB RiQs2jCw==; Received: by zero.zsh.org with local id 1qudh2-0009Ob-Ky; Sun, 22 Oct 2023 19:00:56 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f50.google.com) smtp.remote-ip=209.85.218.50; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f50.google.com ([209.85.218.50]:47331) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qudgB-00095O-Ge; Sun, 22 Oct 2023 19:00:05 +0000 Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-9bf0ac97fdeso359910266b.2 for ; Sun, 22 Oct 2023 12:00:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1698001203; x=1698606003; darn=zsh.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ZVQZobZOIiknpzywir5F6o46OwBYoszQu+ynxfDbLk4=; b=1TUcCHcdrqK+5SkmOT0WsRxs7VqQmV/sszTUmN+KKg2kUn45lNfjxa653prwQake/Q dnNacqBuEPtimjrWONd6Xx2F/DM5p+q9x34Ko2Rm/EYAeGOhIbWOhdeYODne6+H4mSDD COTLkTVPpB1MpfA9rKMe3a5DxlK8QyUA42O5pDuNHEP2Eqe/nf7PpY8Jmk3tnzeVvRPL VRqFD2Tx8Wn54QrYSADJZ7b1HCpKVSC75KgycTof9ctuj8mzc+1oHF2hp65tpnzg5RcF LmEu7cXQe4HdmyvteUnV7+h5xBXtRw1NLAjuWKB9PVllVidLqp9K1JW2deEcQDwURYIy 724A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698001203; x=1698606003; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZVQZobZOIiknpzywir5F6o46OwBYoszQu+ynxfDbLk4=; b=O5j84NlbOv7zcnoGH5t/46YO76QbYPxBy7YLh5Luo7eZNDN2tLV+4jplAv8FGimeRl lhty9aadFhYt/AX9tXfELfL3HZar/Wnx/W0RwBJAfxg6L330TmyeCGP3YX6wxzNAMns+ VgXDQxAoPnvaTokfMEthF5RjjOp/28I3095m7AXvMY5oaoMD8Bal9YTljkgqNUFN4Qx0 8oJRl29Sf5/Eg8xkM3OX6ungBf8miOC0dYYRfe+E3WZZzfOOW/ynuKXYjxqftr0QVtVe Va3Fk/kclcp6oAN7XOLSsIwYwHH2QhRg+OAfM3B0OneniQLGqjjetR13lCldDKnqaqlr v+Yw== X-Gm-Message-State: AOJu0Yzo37cnNW8Z8QhN5OtftNSbdvZSNJe3Dt7RXTmQBtuMeRbWT9k+ FNieSzfx9ERl52PtvuugdZ/mrvAc/fpUKIiyHLNaOA== X-Google-Smtp-Source: AGHT+IHwe3VrLmKrM5UE9/mJgm8HO2Y6SJdFUifujIuUtrU+0oUb3K1CrsoGk6uH7qW5WOSrYIOjomxS6LLBKqaClFg= X-Received: by 2002:a17:907:961a:b0:9bf:39f3:f11d with SMTP id gb26-20020a170907961a00b009bf39f3f11dmr6839213ejc.30.1698001202697; Sun, 22 Oct 2023 12:00:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Sun, 22 Oct 2023 11:59:51 -0700 Message-ID: Subject: Re: `pwd -P` with systemd-homed causes inconsistent cwd state To: Kyle Laker Cc: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52239 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Sat, Oct 21, 2023 at 9:26=E2=80=AFAM Kyle Laker wrote= : > > Thanks for the context! So it seems like the issue is in the > non-getcwd() zgetdir() code path. Checking against master, this issue is > no longer present with a default configure after workers/50287 Aha. I should have thought to look at the older source. > I'm not sure how these btrfs homedir mounts can be determined in > situations like this (or how valuable it would be since nearly everyone > with btrfs probably has a working getcwd(3)). But perhaps if the final > zchdir() fails, zgetdir() could chdir(3) back to the original path > rather than the resolved path? So this reaches the "return NULL" at the end of zgetdir(), after the comment "Something bad happened." ? Or conversely this is a consequence of zgetdir() not checking the return value from zchdir(), which it doesn't in a couple of places?