From: "João Santos" Date: 2009-08-24T07:34:06+09:00 Subject: Re: Interactive Commands Robert Klemme wrote: > On 22.08.2009 22:51, Jo�o Santos wrote: >> Anyhow some of the functions of the bot require to execute commands on >> the server itself, managed to do fine using the backticks but every now >> and then the bot just hangs because sometimes when deleting files, ie, >> the OS asks for permission and waits for user input ... and it just >> hangs there waiting. > > Why do you need an external process to delete files? Its just an example, what i want is to execute system commands even those who wait for user input. Doesnt really matter if it is over IRC i cant run a command under ruby which requires input without making the whole script hang. > > Well, then you need one of the popen variants and need to read the > command's output, detect that it needs input and handle that accordingly > (e.g. forward it to a client). > > Kind regards > > robert Can you point me which one ? Or to some documentation on popen, i havent found any decent documentation on popen3 or popen4, i've been following examples and trial'n'error basically -- Posted via http://www.ruby-forum.com/.