From: Tony De Date: 2010-10-22T08:12:17+09:00 Subject: Re: How to pass/return a string to calling program? Jeremy Bopp wrote in post #956168: > On 10/21/2010 3:20 PM, Tony De wrote: >> client. In ruby I've tried without success: >> >> puts msg_string >> exit >> >> print msg_string >> exit > > These should definitely work. > >> at_exit {print msg_string} >> exit >> >> at_exit {puts msg_string} > > I haven't had a need to use at_exit before, but I suspect that these > should also work. > > Have you tried directly running your scripts by hand to confirm that > they output something at all? If they are printing something, try > making stdout and stderr synchronous rather than buffered in your > scripts: > > $stdout.sync = $stderr.sync = true > > -Jeremy Jeremy I am definitely getting output (a simple OK for testing): root@smi2-new:/usr/local/services/secure_dir# ./service_prov ../config_files/pms.2006.66056308205 OKroot@smi2-new:/usr/local/services/secure_dir# I tried the sync option, but client didnt' get the response. My perl script does... Thanks so much -- Posted via http://www.ruby-forum.com/.