public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Buchbinder, Barry (NIH/NIAID) [E] via cygwin" <cygwin@cygwin.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: non-persistent storage?
Date: Thu, 12 Dec 2019 22:07:00 -0000	[thread overview]
Message-ID: <BYAPR09MB29010912EBAE9D8F0196D35E9B550@BYAPR09MB2901.namprd09.prod.outlook.com> (raw)

Eliot Moss sent the following at Thursday, December 12, 2019 2:19 pm
>On 12/12/2019 7:00 AM, Ulli Horlacher wrote:
>
>> I need to store some data (a few kB) non-persistent.
>> On a real UNIX I would use /var/run, because after a shutdown all its
>> content is lost.
>> But on cygwin /var/run is stored on disk.
>>
>> I cannot use an environment variable, because different processes need
>> to read/write the data.
>>
>> /proc is non-persistent (in respect to a reboot), but It is not a
>> generic storage place.
>>
>> What can I use with cygwin instead?
>>
>> Installing third party software is not an option, it must work with a
>> standard Windows (and cygwin).
>
>I would think of temp directories, such as /tmp. They can be cleaned out
>at will on restart, no?

Bash runs the file ~/.bash_logout when it exits.  One could use that to
clear a temp file out of /tmp.

If the temp file was created by mktemp and the name saved in an
environmental variable, each bash shell could have its own file with not
risk that an instance of bash would erase another instance's file.

That assumes that this is consistent with your need for different
processes to read/write data.

Good luck,

- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

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


             reply	other threads:[~2019-12-12 21:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 22:07 Buchbinder, Barry (NIH/NIAID) [E] via cygwin [this message]
2019-12-12 22:45 ` Ulli Horlacher
2019-12-12 22:57   ` Erik Soderquist
2019-12-12 23:03     ` Erik Soderquist
2019-12-12 23:21     ` Ulli Horlacher
2019-12-13 22:43     ` Buchbinder, Barry (NIH/NIAID) [E] via cygwin
2019-12-14  2:08       ` Erik Soderquist
2019-12-14 14:10         ` Steven Penny
2019-12-12 23:04   ` Jürgen Wagner
2019-12-12 23:51     ` Ulli Horlacher
2019-12-13  1:06       ` Jürgen Wagner
2019-12-13 12:14         ` Ulli Horlacher
2019-12-13 16:20           ` Marco Atzeri
2019-12-13 22:53           ` Mark Geisert
2019-12-13  7:25       ` Jürgen Wagner
2019-12-13  9:41         ` Ulli Horlacher
2019-12-16 19:31           ` Corinna Vinschen
2019-12-17  8:37           ` Andrey Repin
2019-12-17  8:49             ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BYAPR09MB29010912EBAE9D8F0196D35E9B550@BYAPR09MB2901.namprd09.prod.outlook.com \
    --to=cygwin@cygwin.com \
    --cc=barry.buchbinder@nih.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).