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]

Bash bug


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/


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