2009ë…„ 4ì›” 16ì¼ (ëª©) ì˜¤ì „ 9:59, Jun Y. Kim email@example.comë‹˜ì˜ ë§:
under a hanging situation, I cannot also see this message.
(a) I tried to get 1byte by sysread. it’s not different.
(b) Is interactive tty different from stdin, stdout?
I believe although ftp is using tty, it should print out something in
stdin, stdout, stderr = popen3(“ftp -inv ftp.gnu.org”)
I guess ftp is trying to interact with tty.
Using pty and expect is more suitable in this case
PTY.spawn(‘ftp ftp.gnu.org’) do |r,w,cid|
r.expect /Name.*:\s+/ do |line|