pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: save translate error


From: John Darrington
Subject: Re: save translate error
Date: Wed, 14 Jan 2015 10:17:43 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

[ Moving to address@hidden ]

On Wed, Jan 14, 2015 at 08:47:47AM +0100, Alberto Cabello S??nchez wrote:
     
     Also, it seems "almost OK": it raises an error but then displays "success",
     but still an error (as the file is not created). Double-checking the 
Windows
     behaviour regarding this code
     
       /* Create the file on disk. */
       w->rf = replace_file_start (fh_get_file_name (fh), "w", 0666,
                                   &w->file, NULL);
       if (w->rf == NULL)
         {
           msg (ME, _("Error opening `%s' for writing as a system file: %s."),
                fh_get_file_name (fh), strerror (errno));
           goto error;
         }
     
One thing which looks suspicious to me:

errno is used *way* after it would have been set by the failed system call.
This would explain the apparent "Success".  The interesting value of errno
has likely been overwritten by subsequent calls.

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]