<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://95.179.246.60/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Using_file_locks</id>
	<title>Using file locks - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://95.179.246.60/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Using_file_locks"/>
	<link rel="alternate" type="text/html" href="http://95.179.246.60/mediawiki/index.php?title=Using_file_locks&amp;action=history"/>
	<updated>2026-05-08T12:44:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>http://95.179.246.60/mediawiki/index.php?title=Using_file_locks&amp;diff=107&amp;oldid=prev</id>
		<title>Nmingott: imported material</title>
		<link rel="alternate" type="text/html" href="http://95.179.246.60/mediawiki/index.php?title=Using_file_locks&amp;diff=107&amp;oldid=prev"/>
		<updated>2025-05-04T20:39:16Z</updated>

		<summary type="html">&lt;p&gt;imported material&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;TODO&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
* This page has to be still made. Here follows info to do it provided by Dave (see mailing 23-24-Sep-2021)&lt;br /&gt;
* See class: &amp;lt;code&amp;gt;UnixProcessFileLockTestCase&amp;lt;/code&amp;gt;&lt;br /&gt;
* See class: &amp;lt;code&amp;gt;OSFileLock&amp;lt;/code&amp;gt;&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
 File locking is done with posix advisory file locking, as describe in the&lt;br /&gt;
 man(2) flock man page &amp;lt;nowiki&amp;gt;https://man7.org/linux/man-pages/man2/fcntl.2.html&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 The necessary primitives are in all of the unix VMs, and are implemented&lt;br /&gt;
 in the UnixOSProcessPlugin. The plugin source is maintained at&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://www.squeaksource.com/OSProcessPlugin&amp;lt;/nowiki&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 I am attaching a copy of the three primitive methods so you can&lt;br /&gt;
 see what they are doing. These are Smalltalk methods in the plugin&lt;br /&gt;
 that are translated to C code. You can find the generated C code&lt;br /&gt;
 for these methods somewhere in the plugin code at&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://squeakvm.org/cgi-bin/viewvc.cgi/squeak/trunk/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c?revision=3807&amp;amp;view=markup&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 The methods in package OSProcess make use of these primitives to implement&lt;br /&gt;
 file locking in Squeak/Cuis, and the unit tests that I referenced show how&lt;br /&gt;
 it works in the image. UnixOSProcessAccessor provides the direct interface&lt;br /&gt;
 to the primitives (see category &amp;#039;file locking&amp;#039;), and OSFileLock and&lt;br /&gt;
 OSFileRegionLock represent locks on files or regions within a file.&lt;/div&gt;</summary>
		<author><name>Nmingott</name></author>
	</entry>
</feed>