Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Improved temp-file creation



Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx> output:
:--- Src/builtin.c	18 Oct 2004 19:07:50 -0000	1.130
:+++ Src/builtin.c	19 Oct 2004 05:32:17 -0000
[...]
:-	if (((tempfd = open(fil, O_WRONLY | O_CREAT | O_EXCL | O_NOCTTY, 0600))

:--- Src/exec.c	18 Oct 2004 19:07:55 -0000	1.75
:+++ Src/exec.c	19 Oct 2004 05:32:19 -0000
[...]
:-    if (!s || (fd = open(s, O_CREAT|O_WRONLY|O_EXCL|O_NOCTTY, 0600)) == -1)

:+gettempfile(const char *prefix, int use_heap, char **tempname)
[...]
:+	if ((fd = open(fn, O_RDWR | O_CREAT | O_EXCL, 0600)) >= 0)

You've replaced a couple of open()s which were O_NOCTTY with one that isn't.
Does this affect anything?  Were they erroneously O_NOCTTY or were they
specifically that way for scripts or something else?  You haven't mentioned
either here or in the ChangeLog that this was intentional.

Regards,
Geoff



Messages sorted by: Reverse Date, Date, Thread, Author