X-Recipient: archive-cygwin@delorie.com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC53D3858C33
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1680535832;
	bh=5Y4qpne59YNZP8Z2FL9ScTen1ePlParEOLCMR6qnnxY=;
	h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=vjE29toxxMJPm90T/WZgktXyPUbJNQmMi/hP/YgcpoCnYhXqE+SPwMUSBAH9SpIi3
	 Bl9CC3d5mp8WOpdWx3uABnvmOA/0u0F1pL586rvt8DUmOAJvIDuPfEa/uWRLbcTkNW
	 P65Q0NSd0hXaPRWOTnDVxWfqV0SlDh4MkOruw/C4=
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A19D138582BC
X-Authority-Analysis: v=2.4 cv=J8G5USrS c=1 sm=1 tr=0 ts=642af0eb
 a=DxHlV3/gbUaP7LOF0QAmaA==:117 a=DxHlV3/gbUaP7LOF0QAmaA==:17
 a=IkcTkHD0fZMA:10 a=8pif782wAAAA:8 a=w_pzkKWiAAAA:8 a=zNyydqMp6s6yAvf0jBMA:9
 a=QEXdDO2ut3YA:10 a=sRI3_1zDfAgwuvI8zelB:22
Message-ID: <042bac58-c4c4-56c5-e2be-5b571d229f4a@Shaw.ca>
Date: Mon, 3 Apr 2023 09:29:46 -0600
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
 Thunderbird/102.9.1
Subject: Re: 'tac' trying to use "/tmp"; Error: not found
To: cygwin@cygwin.com
References: <CAOoKcr3-vGedWvQWu8kmKJ48AfGpaqO0pHQG-KZFc2h+SAuKSw@mail.gmail.com>
 <CAOoKcr3rB3cLPs+OX=qC0DVoS=pnbaOQH5HLxAa53bjb4mVwKQ@mail.gmail.com>
 <CAOoKcr3gXr3QMT6sJkHC=jVsuFnXamOpdHJ3dt9=yCixYeAzrQ@mail.gmail.com>
 <CAOoKcr2sX3LTPt__nkU0onVXpicDQUmEdSgv8L2UnR+KKv6sug@mail.gmail.com>
 <CAOoKcr1hm_F7e9pLDDu55WdZA_yN6eKFw_ibF5eHSGJbxFnfcA@mail.gmail.com>
 <CAB8Xom-zk0FKPjWdOnw1Ww_rh25YYhaRt-YuUJELj20PqNXNpQ@mail.gmail.com>
Content-Language: en-CA
Organization: Inglis
In-Reply-To: <CAB8Xom-zk0FKPjWdOnw1Ww_rh25YYhaRt-YuUJELj20PqNXNpQ@mail.gmail.com>
X-CMAE-Envelope: MS4xfMzeoPaXgpOAJsPvrgTggOX62TtJtgiTsXUTlzE3xLiFKpJ5kbQMs4vyEdYrha6/zB13vCGdq7a+1JYG39fhkKRs5PTS1weXQw1qN86NzkLEqCI+CGzh
 nZ7VbV/prK3bNDb4XKL3bjhnQnP+MO/qb/dD00SW4vEpe8W30bn3epQXtT0u/B2K5+PItxAzPMuyLA==
X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_LOW,
 SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
From: Brian Inglis via Cygwin <cygwin@cygwin.com>
Reply-To: cygwin@cygwin.com
Cc: Brian Inglis <Brian.Inglis@Shaw.ca>
Content-Type: text/plain; charset="utf-8"; Format="flowed"
Errors-To: cygwin-bounces+archive-cygwin=delorie.com@cygwin.com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 333FUtIY010428

On 2023-04-02 21:22, marco atzeri wrote:
> On Sun, Apr 2, 2023 at 9:43 PM Prof. Luis G. Uribe C. wrote:
>> *|  'tac'  utility dies with a not found "/tmp" error.  |*

It is preferable to copy the exact command(s) and output into your problem 
report. Presumably the input is a pipe or non-seekable device which needs 
buffered in a temp file.

>>    I didn't see this problem in older 'tac' versions...
>>    I created "/tmp" under my root directory:
>> *    "c:\tmp"* (Windows 10), *to no avail*.
>>    I make a  *tmp*  dir directly *above*, in the *parent's 'tac' dir*:
>>       *"../tmp"*, at the same level as other usual folders like:
>>          *bin*, *dev*, *etc*, *lib*, *sbin*...,
>>    and now: *'**tac' works fine**!*

The /tmp directory needs to be created in the Cygwin POSIX root directory "/".

[I am surprised GNU tac does not yet use mmap where available, as an alternative 
to seek, as mmap has been around for decades, since 4.4BSD, SysVr4, and Solaris 
2.0 days, and should be faster on huge files.]

> The expectation for the existence of /tmp directory is well founded
> https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
> I assume by accident your installation pruned the directory.
> I will not be surprised if other programs also complain, not only tac

You can point to another dir under a shell (or export the env var) using e.g.

	$ export TMPDIR=${TMP:-${TEMP:-/tmp}}
or
	$ TMPDIR=. tac ...

If you have Cygwin bash and coreutils installed, under bash or a similar shell 
with brace expansion you can restore the install directories with:

	$ /bin/mkdir -pv -m 0755 /{bin,dev,etc,lib} \
		/usr/{bin,lib,local/{bin,etc,lib},src}
	$ /bin/mkdir -pv -m 01777 /dev/{mqueue,shm} /etc/fstab.d \
		/{home,{,usr/}tmp} /var/{log,run,tmp}
	$ /bin/mkdir -pv -m 0666 /var/run/utmp
see:
	https://cygwin.com/git/?p=cygwin-apps/setup.git;a=blob;f=install.cc#l156

If the directories do not have the correct permissions, use chmod to fix them.

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer     but when there is no more to cut
                                 -- Antoine de Saint-Exupéry

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

