• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

servlet calling perl script - script hangs

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using tomcat on NT4.0, and cygwin perl is being used since it implements the perl alarm() fcn on windows. The servlet can invoke the script using:
Process p = Runtime.getRuntime().exec(theScript);
the script starts, does a dns lookup and some ftp commands succeesfully but hangs once it starts doing an ftp put. Works if I put the command line in a ".bat" file and execute "start name.bat" above but I need the exit value of the script.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you grabbing the output of the process? You need to accept the output stream and error stream or the process can freeze up.
Bill

------------------
author of:
 
reply
    Bookmark Topic Watch Topic
  • New Topic