| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-Id: | <200509211413.j8LEDAZV011552@tigris.pounder.sol.net> |
| To: | cygwin AT cygwin DOT com |
| From: | cygwin AT trodman DOT com (Tom Rodman) |
| Subject: | fairly repeatable fork(?) errors in (contrived) test script |
| Date: | Wed, 21 Sep 2005 09:13:09 -0500 |
| X-IsSubscribed: | yes |
All:
I'm using the 9/19 snapshot. The sleep in the below test script seems to
be required, otherwise the script could be simplified and still
cause errors.
The test script works (always?) without errors on 1.3.20.
Here are a couple of test runs:
~ $ /tmp/test
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 7
x: 8
x: 9
896 [main] bash 6544 fork_parent: child 6680 died waiting for longjmp before initialization
/tmp/test: fork: No such file or directory
all done
~ $ /tmp/test
x: 1
x: 2
x: 3
x: 4
x: 5
x: 6
x: 7
x: 8
x: 9
/tmp/test: fork: No such file or directory
812 [main] bash 7028 fork_parent: child 3576 died waiting for longjmp before initialization
/tmp/test: fork: Bad file descriptor
all done
--
With a real (ie useful) script (that also involved a sleep) I was able to
get similar(?) errors after running only 5 instances of that
script in parallel.
"do nothing" test script:
--v-v------------------C-U-T---H-E-R-E-------------------------v-v--
#!/bin/bash
bar()
{
foo=$(
echo $(
perl -pe '1;' /etc/passwd|
tee /dev/null|
(sleep 7;tr '[A-Z]' '[a-z]') |
tail -1
)
)
echo foo: $foo >/dev/null
}
for x in 1 2 3 4 5 6 7 8 9
do
echo x: $x
bar &
done
wait
echo
echo all done
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |