Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Killing subprocess in windows

by Marshall (Canon)
on May 20, 2021 at 18:35 UTC ( #11132799=note: print w/replies, xml ) Need Help??

in reply to Killing subprocess in windows

I don't know if this is helpful or not?
I ran:
use strict; use warnings; open my $fh, '>'. "testingwrite" or die; my $count = 20; while ($count--) { print $fh "count = $count\n"; sleep (5); }
in one Win10 command window.

Then I ran ">handle testingwrite" in another command window:

C:\Users\xxx\Documents\PerlProjects>handle testingwrite Nthandle v4.22 - Handle viewer Copyright (C) 1997-2019 Mark Russinovich Sysinternals - perl.exe pid: 2488 type: File E8: C:\Users\xxx\Documents\PerlPro +jects\testingwrite C:\Users\xxx\Documents\PerlProjects>
This will give you the pid of processes that have an open file handle to "testingwrite".

handle is freeware from Microsoft as part of sysinternals.

Replies are listed 'Best First'.
Re^2: Killing subprocess in windows
by LanX (Cardinal) on May 20, 2021 at 21:23 UTC
    That's helpful ... :)

    ... but not for this problem.

    The PS scripts are reading from not writing to the file, and there might be more than one reader

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11132799]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2021-08-05 07:55 GMT
Find Nodes?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)

    Results (44 votes). Check out past polls.