diff src/event-stream.c @ 251:677f6a0ee643 r20-5b24

Import from CVS: tag r20-5b24
author cvs
date Mon, 13 Aug 2007 10:19:59 +0200
parents 83b3d10dcba9
children 11cf20601dec
line wrap: on
line diff
--- a/src/event-stream.c	Mon Aug 13 10:19:12 2007 +0200
+++ b/src/event-stream.c	Mon Aug 13 10:19:59 2007 +0200
@@ -86,6 +86,7 @@
 
 #include "sysdep.h"		/* init_poll_for_quit() */
 #include "syssignal.h"		/* SIGCHLD, etc. */
+#include "sysfile.h"
 #include "systime.h"		/* to set Vlast_input_time */
 
 #include "events-mod.h"
@@ -4810,7 +4811,9 @@
       int fd;
 
       file = Fexpand_file_name (file, Qnil);
-      fd = creat ((char *) XSTRING_DATA (file), 0666);
+      fd = open ((char*) XSTRING_DATA (file),
+		 O_WRONLY | O_TRUNC | O_CREAT | OPEN_BINARY,
+		 CREAT_MODE);
       if (fd < 0)
 	error ("Unable to create dribble file");
       Vdribble_file = make_filedesc_output_stream (fd, 0, 0, LSTR_CLOSING);