<<< Date Index >>>     <<< Thread Index >>>

Re: Don't stat(2) commands!



Good point.   Very good point.

On 2004-02-06 15:46:38 -0500, David Yitzchak Cohen wrote:
> From: David Yitzchak Cohen <lists+mutt_devs@xxxxxxxxxxxxxx>
> To: Mut Devs <mutt-dev@xxxxxxxx>
> Date: Fri, 06 Feb 2004 15:46:38 -0500
> Subject: Don't stat(2) commands!
> Mail-Followup-To: Mut Devs <mutt-dev@xxxxxxxx>
> X-Spam-Level: 
> 
> While trying to reproduce Chirstopher's problem (in mutt-users) updating
> my Mutt, I discovered something interesting: the source command no longer
> appears to recognize my pipes, and instead tries to stat the command,
> promptly discovering the file doesn't exist.
> 
> Looking at the code, the problem is pretty obvious.  A recent patch to
> init.c (the one that was supposed to prevent Mutt from silently failing
> to read nonexistant RC files, IIRC) changed source_rc() to stat(2) the RC
> "file" before trying to mutt_open_read() it.  There's only one problem
> here: source_rc() has no way of knowing whether or not its "file" is
> a file or a command.  I'm attaching a patch that fixes the problem in
> what I believe is the right way.
> 
>  - Dave
> 
> -- 
> Uncle Cosmo, why do they call this a word processor?
> It's simple, Skyler.  You've seen what food processors do to food, right?
> 
> Please visit this link:
> http://rotter.net/israel


-- 
Thomas Roessler · Personal soap box at <http://log.does-not-exist.org/>.

Attachment: pgpaOCjSjPQOI.pgp
Description: PGP signature