cc: [email protected] Subject: Re: [ast-users] getting nothing from read --------
> I am using ksh (sh (AT&T Research) 93u+ 2012-08-01) on Cygwin under Windows > 7. I > was writing a test script that would process a file list by creating up to a > de > fined number of processes in parallel to handle the task. As each process > comple > tes, it would send a signal (USR1) back to the parent to indicate that > another p > rocess could be started so to keep the processes at the predefined number. > The p > roblem I found is that the read of the file list will sometimes return > nothing i > nstead of the next file causing a premature exit and I am wondering why? In > my t > est file list I just have the numbers 1 to 100 with one number per line. When > I > insert a sleep delay (bgproc), it will make it through the list though will > some > times end with the message "kill: 6152: no such process". Since I only start > a p > rocess once I have a file name, this shouldn't happen and I have a wait at > the e > nd so that the parent should exist until all files are processed. Any idea > why t > his should be happening? Example script: > I don't have cygwin, but I tried this on UWIN with windowns version 7 using the same version of ksh. You didn't say what the output is supposed to be. I got 103 lines, with lines 3 to 101 line with a 1 and a number. The last line says done!. Therefore, this looks like a cygwin bug, not a ksh93 bug. David Korn [email protected] _______________________________________________ ast-users mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-users
