beemshake has asked for the wisdom of the Perl Monks concerning the following question:

Hello monks. I am trying to run the debugger on a perl 5.8.5 script that forks several child processes. The debugger dutifully spawns new xterms for each of the children, but that's actually causing me problems. I need to break at a point in the parent process that is after the forks, but the children send messages via socket, so they are timing sensitive and I can't hit "c" in each window before one of them croaks and dies.

Is there a way to tell the debugger not to give me a window for the child processes, and instead just run them as though they weren't using the debugger?

thanks.

Replies are listed 'Best First'.
Re: perl debugger and forking
by Joost (Canon) on May 18, 2005 at 19:14 UTC
    On linux I can do DISPLAY="" perl -d test.pl which will only use 1 xterm:
    xterm: DISPLAY is not set ######### Forked, but do not know how to create a new TTY. ######### Since two debuggers fight for the same TTY, input is severely entang +led. I know how to switch the output to a different window in xterms and OS/2 consoles only. For a manual switch, put the name of the cr +eated TTY in $DB::fork_TTY, or define a function DB::get_fork_TTY() returning +this. On UNIX-like systems one can get the name of a TTY for the given win +dow by typing tty, and disconnect the shell from TTY by sleep 1000000.

    I get mixed output/input from the different processes, though, so it's probably not very useful to run the program like this :-)

      I am getting this error, what i need to do.Please tell me

        What part of Joosts description do you have problems with?