diff --git a/.classpath b/.classpath
new file mode 100644
index 0000000..d136716
--- /dev/null
+++ b/.classpath
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/.externalToolBuilders/Create RXTX Jar.launch b/.externalToolBuilders/Create RXTX Jar.launch
new file mode 100644
index 0000000..bf714e3
--- /dev/null
+++ b/.externalToolBuilders/Create RXTX Jar.launch
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/.gitignore b/.gitignore
index 3402cf3..72617d2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,6 @@ libtool
stamp-h1
gnu
x86_64-unknown-linux-gnu
-RXTXcomm.jar
\ No newline at end of file
+RXTXcomm.jar
+/bin/
+/i686-pc-linux-gnu/
diff --git a/.project b/.project
new file mode 100644
index 0000000..dc68a07
--- /dev/null
+++ b/.project
@@ -0,0 +1,27 @@
+
+
+ RXTX
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.ui.externaltools.ExternalToolBuilder
+ full,incremental,
+
+
+ LaunchConfigHandle
+ <project>/.externalToolBuilders/Create RXTX Jar.launch
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..160d789
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/SerialImp.c b/src/SerialImp.c
index 617eaac..57a48a2 100644
--- a/src/SerialImp.c
+++ b/src/SerialImp.c
@@ -718,7 +718,10 @@ JNIEXPORT jint JNICALL RXTXPort(open)(
}
#endif /* OPEN_EXCL */
- if( configure_port( fd ) ) goto fail;
+ if( configure_port( fd ) ) {
+ UNLOCK( filename, pid ); // If the device is not present (ie /dev/ttyXXX is not there), the lock file MUST be cleaned tobe able to reconnect witout manually removing /var/lock/LCK...XXXX
+ goto fail;
+ }
(*env)->ReleaseStringUTFChars( env, jstr, filename );
sprintf( message, "open: fd returned is %i\n", fd );
report( message );