in reply to Re: more problems running a program that hogs the termnial
in thread more problems running a program that hogs the termnial

I'm running this script on Solaris 9. I tried kill 1 and kill 9 -- neither work. The script does absolutely nothing (including trying to kill it) untill the pid is killed. Hence, my delima. :(
  • Comment on Re^2: more problems running a program that hogs the termnial

Replies are listed 'Best First'.
Re^3: more problems running a program that hogs the termnial
by BrowserUk (Patriarch) on Apr 15, 2005 at 05:04 UTC

    'k. Sorry for the bum steer. Strange though, if you can terminate the same program with ^C?

    You probably need to look at IPC::Open2 or maybe the Expect program?


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco.
    Rule 1 has a caveat! -- Who broke the cabal?
Re^3: more problems running a program that hogs the termnial
by thor (Priest) on Apr 15, 2005 at 05:49 UTC
    I tried kill 1 and kill 9 -- neither work.
    Then something's wrong. Signal 9 is SIGKILL. When a program is issued a SIGKILL, it must exit. The operating system ensures that. Nothing can trap a SIGKILL. Something tells me that you're not sending a signal to the correct process. How are you trying to issue the kill?

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

      The kill is never executed... that's the point. I've got it in my script, but until something kills the pid created by the file handle, the script will not continue.
      It's not getting executed...that's the problem. The script will not go anywhere until the $pid is killed. In this case, I have to do it externeally or by typing quit in the terminal. Anyone can emulate this if they've got a Unix-ish system.
      my $pid = open(DUMP, "top|") || die $!; # or 'prstat' will work while ( <DUMP> ) { chomp; print "$_\n"; } kill 9, $pid;
      I tried using IOC::Open2, assuming I can write "quit" (which will kill the program) but since script isn't going anywhere...