Balazs Scheidler <[EMAIL PROTECTED]> writes:
> Sent it in private again... Maybe a reply-to is missing ?
I'd say NO. An occasional reply sent privately instead of publicly is
a lot better than the other way round. And automatically setting
Reply-To: to the list address is Evil, it breaks stuff for those using
Reply-To for legitimate reasons, and it helps Stupid and Evil
mailprograms, which lack the important Reply-to-sender/Reply-to-all
distinction, survive.
> This must be the problem. According to linux manpage:
>
> F_SETFL Set the descriptor's flags to the value specified
> by arg. Only O_APPEND, O_NONBLOCK and O_ASYNC
> may be set; the other flags are unaffected.
>
> So O_APPEND must be present here as well, this patch should fix the problem
> (against lsh-000.2):
I wrote the io_set_nonblocking before I found any use for O_APPEND... ;-/
> --- io.c~ Sun Dec 12 20:32:03 1999
> +++ io.c Sat Jan 8 14:15:46 2000
> @@ -913,7 +913,7 @@
>
> void io_set_nonblocking(int fd)
> {
> - if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0)
> + if (fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) < 0)
> fatal("io_set_nonblocking: fcntl() failed, %z", STRERROR(errno));
> }
I'm checking in a similar fix, which checks the return code from the
inner fcntl as well.
As for io_set_close_on_exec, is the corresponding fix needed there? My
man pages says that there is only one flag that can be set, and that
all but the least significant bit is ignored. But perhaps stranger or
future systems have more flags for F_GETFD/F_SETFD?
/Niels