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

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Jan 17 09:28:00 GMT 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20140117/e66a0c3b/attachment.sig>


More information about the Cygwin mailing list