This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fork() + file descriptor bug in 1.7.27(0.271/5/3) 2013-12-09 11:54


On Jan 16 23:53, tednolan@bellsouth.net wrote:
> In message <20140116085026.GA26205@calimero.vinschen.de>you write:
> >
> >Can you change your testcase another bit, please?  Enable your
> >`ftell' printf, but rather than printing the result of ftell,
> >print the result of lseek:
> >
> >  fprintf(stderr, "(%s) (%s) %d %ld\n", infile,
> >        outfile, i, lseek(fileno(fp), 0, SEEK_CUR));
> >
> >I would be curious what happens on Solaris here.
> >
> 
> OK,
> 
> I took the original test case and made your lseek change.  Here are
> the Solaris & FreeBSD results.
> 
> Here is Solaris 9:
> 
> =====================SOLARIS========================
> Script started on Thu Jan 16 23:47:20 2014
> solabel10% ./a.out < test_data
> (00.tif) (00.eps) 1 45
> Running 0
> child
> (01.tif) (01.eps) 2 15
> Running 1
> child
> (02.tif) (02.eps) 3 0
> Running 2

Thanks!  That's exactly what happens on Cygwin as well.

I'm about to check in code to newlib which allows to choose between
Solaris/POSIX semantics to BSD/Linux semantics(*) at build time.  Since
Linux is our role model, we're going to switch to BSD/Linux semantics
for the next Cygwin release as well.


Thanks,
Corinna

(*) More precise: BSD/Glibc semantics.

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgp7F1lSmHNTL.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]