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


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
child
(00.tif) (00.eps) 4 45
Running 3
child
(01.tif) (01.eps) 5 15
Running 4
child
(02.tif) (02.eps) 6 0
Running 5
child
(00.tif) (00.eps) 7 45
Running 6
(01.tif) (01.eps) 8 45
Running 7
(02.tif) (02.eps) 9 45
Running 8
Final wait
Final wait
Final wait
Final wait
Final wait
Final wait
Final wait
child
Final wait
child
child
Final wait
solabel10% exit
solabel10% 
script done on Thu Jan 16 23:47:29 2014
=====================END SOLARIS========================

Freebsd 4.9:

=====================FREEBSD 4.9========================
loft% ./a.out < test_data
(00.tif) (00.eps) 1 45
Running 0
(01.tif) (01.eps) 2 45
child
Running 1
(02.tif) (02.eps) 3 45
child
Running 2
Final wait
child
Final wait
Final wait
=====================END FREEBSD 4.9========================

FreeBSD 9.1:

=====================FREEBSD 9.1========================
(00.tif) (00.eps) 1 45
Running 0
(01.tif) (01.eps) 2 45
Running 1
(02.tif) (02.eps) 3 45
Running 2
Final wait
child
child
Final wait
Final wait
child
brookside% 
=====================END FREEBSD 9.1========================

FreeBSD 8.1:

=====================FREEBSD 8.1========================
%./a.out < test_data
(00.tif) (00.eps) 1 45
Running 0
(01.tif) (01.eps) 2 45
child
Running 1
(02.tif) (02.eps) 3 45
child
Running 2
Final wait
child
Final wait
Final wait
=====================END FREEBSD 8.1========================

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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