non-persistent storage?

Buchbinder, Barry (NIH/NIAID) [E] via cygwin cygwin@cygwin.com
Fri Dec 13 22:43:00 GMT 2019


>On Thu, Dec 12, 2019 at 5:08 PM Ulli Horlacher wrote:
>
>>Erik Soderquist sent the following at Thursday, December 12, 2019 5:45 pm
>>
>> On Thu 2019-12-12 (21:59), Buchbinder, Barry (NIH/NIAID) [E] via cygwin wrote:
>>>
>>> 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.
>>
>> I need the opposite: all processes must read and write the same data!
>> And the data must be gone when system shuts down or even if there is a
>> power failure.
>
> This is very hacky, but I believe you can get the effect you want by
> having an admin process auto-start at host startup, identify itself, and
> then set parts of its own /proc/ process ID tree as world read/write.
> I think this will give you the "destroyed even at power failure"
> impermanence you are looking for. I know it is not in the normal
> layouts (like /var/run/ would be), but we are working around limitations
> imposed by Windows.

One could put a script, batch file, or a link thereto in one's startup
folder that will run on Windows' boot.  The script/batch file would be
written to clean out the tmp files.  Google << windows startup folder >>.
If all processes, regardless of whether they start with the same
shell/subshell, will share the same temp file, one could create the file
upon boot using the same script.

Also, one could make the script that creates the temp file (e.g.,
.bashrc) check the file or an environmental variable so that a subshell
doesn't create a new temp file, if that's how you want it.

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

 ТÒÐÐ¥&ö&ÆVÒ&W÷'G3¢‡GG¢òö7–wv–âæ6öÒ÷&ö&ÆV×2æ‡FÖÀФd¢‡GG¢òö7–wv–âæ6öÒöfðФFö7VÖVçFF–ö㢇GG¢òö7–wv–âæ6öÒöFö72æ‡FÖÀÐ¥Vç7V'67&–&R–æfó¢‡GG¢òö7–wv–âæ6öÒöÖÂò7Vç7V'67&–&R×6–×ÆPРÐ


More information about the Cygwin mailing list