APM: Process/System questions

ezra pagel ezra at jdba.org
Fri Sep 17 11:42:39 CDT 2004


Using backticks/qx instead of system() will let you capture standard 
output; you can redirect stderr if you need it. You can still check $? 
for the system exit code.

Bakken, Tom - Temple, TX wrote:

>Some time ago I posted a problem I was having with a script that was
>supposed to restart workstations but stalled when it hit certain PCs.  I
>used Bill Raty's suggestion of the spawn subroutine.   I wasn't able to
>get it to work and put it aside until I recently had more time and now
>seem to have gotten it running.
>
>Shutdown.exe has a known bug where if the workstation that's to be shut
>down is at the Windows login screen, it will lock up.  Bill's solution
>works around that problem by waiting 20 seconds and then continuing if
>the workstation stalls.  Unfortunately, the system command returns a 0
>exit status for success even if shutdown.exe stalls.  Is there any way
>to capture the output from shutdown.exe which is "the device is not
>ready"?  Either that or if the script does wait 20 seconds and fails,
>can I test for that somehow?
>  
>
<snip>

-- 

-------------------------------------------------------
Ezra Pagel, Software Engineer
Austin Logistics, Inc.
Office: 512-651-5644
Mobile: 512-694-1107
epagel at austinlogistics.com
ezra at cpan.org
-------------------------------------------------------
The information in this Internet email is confidential and may be 
legally privileged. It is intended solely for the addressee. Access to 
this Internet email by anyone else is unauthorized. If you are not the 
intended recipient, any disclosure, copying, distribution or any action 
taken or any action omitted in reliance on it, is prohibited and may be 
unlawful. When addressed to our clients any opinions or advice contained 
in this Internet email are subject to the terms and conditions expressed 
in any applicable governing Austin Logistics' contract terms.



More information about the Austin mailing list