Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: control-C to "jumpstart" windows process

by blazar (Canon)
on Oct 18, 2006 at 14:34 UTC ( #579088=note: print w/replies, xml ) Need Help??

in reply to control-C to "jumpstart" windows process

So, in short, WTF? Has anyone encountered anything like this? What should we do now?

As is often said... hard to say without seeing the code. Do you have or can prepare a minimal example exhibiting this behaviour? Personally I've never met anything like this, and I'm running perl (also) under Windows...

  • Comment on Re: control-C to "jumpstart" windows process

Replies are listed 'Best First'.
Re^2: control-C to "jumpstart" windows process
by punkish (Priest) on Oct 18, 2006 at 14:55 UTC
    disclosure: jimt and I are working together, and are collectively stumped by this problem. Here is some sample code, but it doesn't mean anything at all.

    my $t0 = new Benchmark; print 'Doing stuff... '; .. do a bunch of stuff with, say, DBI .. my $t1 = new Benchmark; print 'Done; This took: ' . timestr(timediff($t1, $t0)) . "\n";

    As mentioned above, this is an occasional problem, in that, it manifests on occasion. I wish it were a constant and replicable problem.

    If we can't find the cause of this problem, is there any way we can get around it? We could have our script send out a "CTRL-C" if we could somehow figure out that.. "well, its been a while and the process should have completed by now." Of course, if we are wrong, and the process is still going on, then we would end up killing the process. Not good.

    In other words, this is a serious pain in the arse, and our hope is that someone else has been bitten by it and has found a reason and/or a cure for it.


    when small people start casting long shadows, it is time to go to bed
      Echoing the other monks, more info would mean more help to you!

      I'm going totally off the top of my head here, but I'm guessing you're trying to output something w/o a newline directly before something is getting processed?

      $x=9999999; print "Test1"; while($x--){0}
      Even though Test1 is passed to STDOUT, the while loop is processed before you see any output.

      If that's the case, try tossing a newline in there. (Again, I'm going off the top of my head here.) Perl won't display the output buffer until a newline is present, the operation holding it up produces output, or the operation is done.

      which version of perl? which version of windows? etc...monks can be more helpful when pertinent details are provided.
      you could try the old "turn of buffering" trick.
      the hardest line to type correctly is: stty erase ^H

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://579088]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2018-06-24 13:38 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (126 votes). Check out past polls.