This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: fork() + file descriptor bug in 1.7.27(0.271/5/3) 2013-12-09 11:54
- From: tednolan at bellsouth dot net
- To: cygwin at cygwin dot com
- Date: Thu, 16 Jan 2014 23:53:59 -0500
- Subject: Re: fork() + file descriptor bug in 1.7.27(0.271/5/3) 2013-12-09 11:54
- Authentication-results: sourceware.org; auth=none
- References: <831845 dot 98759 dot bm at smtp116 dot sbc dot mail dot ne1 dot yahoo dot com> <52D55D96 dot 8070407 at redhat dot com> <946338 dot 89157 dot bm at smtp116 dot sbc dot mail dot ne1 dot yahoo dot com> <CAG9p0OR8JYgC1rzBCn1bvXe5ffpJS3vpmnnxw-7brJi8E8+uhQ at mail dot gmail dot com> <52D63CE2 dot 9060308 at lysator dot liu dot se> <858084 dot 71265 dot bm at smtp116 dot sbc dot mail dot ne1 dot yahoo dot com> <20140115163354 dot GA30234 at calimero dot vinschen dot de> <670957 dot 90887 dot bm at smtp117 dot sbc dot mail dot ne1 dot yahoo dot com> <20140116085026 dot GA26205 at calimero dot vinschen dot de>
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