Index: /trunk/source/level-1/l1-files.lisp
===================================================================
--- /trunk/source/level-1/l1-files.lisp	(revision 8236)
+++ /trunk/source/level-1/l1-files.lisp	(revision 8237)
@@ -193,10 +193,17 @@
   (when (directory-pathname-p path)
     (return-from %create-file (probe-file-x path)))
-  (assert (or (eql if-exists :overwrite) (not (probe-file path))) ()
+  (assert (or (eql if-exists :overwrite)
+              (null if-exists)
+              (not (probe-file path))) ()
 	  "~s ~s not implemented yet" :if-exists if-exists)
   (let* ((unix-name (native-translated-namestring path))
-	 (fd (fd-open unix-name (logior #$O_WRONLY #$O_CREAT #$O_TRUNC))))
+	 (fd (fd-open unix-name (logior #$O_WRONLY #$O_CREAT #$O_TRUNC
+                                        (if (null if-exists)
+                                          #$O_EXCL
+                                          0)))))
     (if (< fd 0)
-      (signal-file-error fd path)
+      (if (eql fd (- #$EEXIST))         ; #$O_EXCL was set and file exists
+        (return-from %create-file nil)
+        (signal-file-error fd path))
       (fd-close fd))
     (%realpath unix-name)))
Index: /trunk/source/level-1/l1-streams.lisp
===================================================================
--- /trunk/source/level-1/l1-streams.lisp	(revision 8236)
+++ /trunk/source/level-1/l1-streams.lisp	(revision 8237)
@@ -5577,5 +5577,5 @@
          (tem-path (merge-pathnames (make-pathname :name (%integer-to-string date) :type "tem" :defaults nil) path)))
     (loop
-      (when (not (probe-file tem-path)) (return tem-path))
+      (when (%create-file tem-path :if-exists nil) (return tem-path))
       (setf (%pathname-name tem-path) (%integer-to-string (setq date (1+ date)))))))
 
Index: /trunk/source/level-1/l1-sysio.lisp
===================================================================
--- /trunk/source/level-1/l1-sysio.lisp	(revision 8236)
+++ /trunk/source/level-1/l1-sysio.lisp	(revision 8237)
@@ -773,5 +773,6 @@
 	      (return-from open nil)))
 	  (if (setq filename (if-does-not-exist if-does-not-exist filename))
-	    (setq native-truename (%create-file filename))
+	    (unless (setq native-truename (%create-file filename :if-exists if-exists))
+              (return-from open nil))
 	    (return-from open nil)))
 	(let* ((fd (fd-open native-truename (case direction
