This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Bash bug
- From: Gregory Borota <not-valid at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 14 Mar 2004 18:55:57 -0600
- Subject: Bash bug
- Reply-to: cygwin at cygwin dot com
I tested this over and over. I think it's a 'nasty' bug here.
#!/bin/bash
(
# sleep 1 # or whatever not very quick command!
set -m;
sleep 10 & # or whatever command takes some time to complete
set +m;
pid=$!
( sleep 1; kill -- -$pid ) &
wait $pid
)
without sleep 1 commented you get:
./bug.sh: line 8: kill: (-760) - No such process
with it uncommented it works as expected
./bug.sh: line 10: 492 Terminated sleep 10
--
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/