Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^4: Need to create a SCSI monitoring child process.

by LivingDust (Novice)
on May 17, 2013 at 15:56 UTC ( #1033990=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Need to create a SCSI monitoring child process.
in thread Need to create a SCSI monitoring child process.

Maybe I am missing something. What you suggest works if the main program has a loop that is monitoring this shared memory block (or file). I know there are loops like this that are constantly monitoring the location of the mouse cursor. You can see the display change when the cursor is over a widget. So I know what I want is possible. There are already files on the Linux system that are only present when a drive is inserted. My main program could detect the presence or absence of these files. Or it could do a system query of the SCSI bus (there are lots of system commands to choose from). But what I want is that this subroutine is always running with a sleep timer to recheck for the presence of these files or to re-issue the system command.

If I don't fork this subroutine, then I never return from the subroutine and my windows never update. But if I fork a process, can my subroutine update global variables in my main process? Is this something I can do in Perl? Or do I need to go to a different language?

There are only 10 types of people in this world... those who understand binary, and those who don't.


Comment on Re^4: Need to create a SCSI monitoring child process.
Re^5: Need to create a SCSI monitoring child process.
by McA (Curate) on May 22, 2013 at 13:48 UTC

    Hi,

    sorry for answering so late. I've just seen your follow up question. Do you still have open questions concerning this thread?

    Best regards
    McA

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (13)
As of 2014-11-28 17:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (199 votes), past polls