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]

Reproducer for TCSH hangs

The following shell script demonstrates a problem that results in hanging scripts with CYGWIN 1.7.7:

#!/bin/csh -f

unalias *
set path = ( /usr/bin /usr/sbin /bin /sbin )

@ i = 0
while (1)

# uncomment this and the iteration will proceed
# in 10 second increments
#   ( sleep 10 ; cat /proc/*/cmdline >& /dev/null ) &

   @ i = $i + 1
   echo -n "$i "
   set foo = `echo "a" | cat | cat`
   echo "ok"


If this is run on our system it will hang most times on the first iteration and certainly within 4 or 5 iterations.

If we uncomment the sleep line, it will run indefinitely
although with as many as 10 seconds per iteration.

The principal features are:

1) Running a command with pipes and setting a shell variable
   to the result.  The more pipes the more certain the hang.

2) Doing a 'cat /proc/*/cmdline' unblocks the pipe lines.
   This quirky feature provides a nearly acceptable workaround
   to keep our system usable.

Attachment: cygcheck.out
Description: Text document

Problem reports:
Unsubscribe info:

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