Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: How to know if a perl script is put in the background (background vs. non-interactive)

by almut (Canon)
on Nov 18, 2008 at 21:58 UTC ( [id://724400]=note: print w/replies, xml ) Need Help??


in reply to Re: How to know if a perl script is put in the background
in thread How to know if a perl script is put in the background

Looking at the implementation of IO::Interactive, it's essentially -t plus some code to handle *ARGV magicness. In other words, it shares the same problem of possibly producing incorrect results when being (mis)used to test if something is running in the background (e.g. when a script is sent into the background using &, executed from an (interactive) command line):

$ ./724312.pl Running interactively $ stty -tostop # just in case $ ./724312.pl & [1] 13831 $ Running interactively [1]+ Done ./724312.pl
  • Comment on Re^2: How to know if a perl script is put in the background (background vs. non-interactive)
  • Select or Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (2)
As of 2024-04-25 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found