Artifacts Associated With Ticket 218087
Ticket change [113bc74936] (rid 95107) by nobody on 2000-10-26 00:53:01:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 1721 Bug Version: 8.0p2 SubmitDate: '1999-04-05' LastModified: '1999-12-03' Severity: CRIT Status: Closed Submitter: pat ChangedBy: hobbs OS: HP-UX OSVersion: 10.20 Machine: Other FixedDate: '2000-10-25' ClosedDate: '1999-12-03' ReproducibleScript: #!/opt/expect-5.25/bin/expect -f set verbose 1 log_user 1 exp_internal -f tclose.log 1 proc send_value {pos val} { # expect $pos send_user $pos\n send_user $val\n } proc send_verb {pos1 pos2 verb retain control_string} { send_value $pos1 $verb send_value $pos2 $retain send_user $control_string\n # expect $control_string } set fin 0 set fifoname /tmp/exp0.333 set fifofile [open "|cat -u < /tmp/exp0.333" "r"] while {$fin == 0} { catch {exec mkfifo /tmp/exp0.333} status exec chmod 666 /tmp/exp0.333 # open will hang until other user's cat starts # spawn -open [open "|cat -u < /tmp/exp0.333" "r"] spawn -open $fifofile set userin $spawn_id # set userin 5 send_user userin=$userin\n # exp_pid while 1 { set spawn_id $userin expect { -re "\n" { set line1 "$expect_out(buffer)" } eof { break } } expect -re "\n" { set line2 "$expect_out(buffer)" } expect -re "\n" { set line3 "$expect_out(buffer)" } send_user line1=$line1\n\n send_user line2=$line2\n\n send_user line3=$line3\n\n if { [llength $line1] > 1 } { send_verb [lindex $line2 0] [lindex $line2 1] [lindex $line1 0] [lindex $line1 1] "$line3" } else { send_bye [lindex $line2 0] [lindex $line1 0] \ "$line3" } } catch {close -i $userin} status # catch {close $fifofile} status send_user close_status=$status\n catch {exec rm -f $fifoname} status send_user rm-fifoname=$status\n } ObservedBehavior: we use expect and tcl/tk. our expect shell is blocked on a pipe open by spawn -open [open |cat -u < filename] when all datas in the pipe are read a trap on eof is executed and another process is done using datas just read. At the end of this process we wait again on pipe by making a new spawn. After some loops we always have the message "too many open files", why? open file ids must be being left open. All file systems have some limit on the number of open files, and usually also have a per process limit. -- 12/03/1999 hobbs - foundin initialized to: "obsolete: 8.0p2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "60. NRE and coroutines"
- title initialized to: "spawn and eof"
- type initialized to: "Bug"
Ticket change [71f80394d3] (rid 100783) by welch on 2000-10-26 08:14:46:
- closedate changed to: "2000-10-26T01:14:46"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [046f00827d] (rid 120000) by dgp on 2001-04-05 08:20:14:
- closedate changed to: "2001-04-05T01:20:14"
- closer changed to: "dgp"
- subsystem changed to: "27. Channel Types"