RE: Having trouble porting an application to MS-Windows
- From: rvm@xxxxxxxxx (Bob McConnell)
- Date: Fri, 15 Jun 2007 11:26:18 -0400
-----Original Message-----
From: Chas Owens [mailto:chas.owens@xxxxxxxxx]
Sent: Friday, June 15, 2007 10:55 AM
To: Bob McConnell
Cc: beginners@xxxxxxxx
Subject: Re: Having trouble porting an application to MS-Windows
On 6/15/07, Bob McConnell <rvm@xxxxxxxxx> wrote:
snip
eval {"alarm\n" }; # NB:
local $SIG{ALRM} = sub { die
\n requiredsnip
alarm $timeout;
$nread = sysread PORT, $line, 1;
alarm 0;
};
This transmits the packet, but never comes out of the eval() if itI missed?
doesn't receive a character. Is there anything obvious that
snip
Hmm, that codes looks right. Do the two scripts I sent earlier work?
Yes, both work with the output below. The difference is that both of
yours interrupt an empty while loop, but my code is in a sysread() call.
The SIGINT I use to kill the process can interrupt the system call, but
will the alarm? Or have I found a bug in the ActiveState implementation?
Bob McConnell
D:\Perl\eg\SIMscript>perl forka.pl
Fri Jun 15 11:16:36 2007
timeout
Fri Jun 15 11:16:39 2007
D:\Perl\eg\SIMscript>perl forkb.pl
parent Fri Jun 15 11:12:57 2007
parent waiting 10 seconds
child Fri Jun 15 11:12:57 2007
child waiting 1 seconds
timeout child
child Fri Jun 15 11:12:58 2007
timeout parent
parent Fri Jun 15 11:13:07 2007
.
- Follow-Ups:
- Re: Having trouble porting an application to MS-Windows
- From: Chas Owens
- Re: Having trouble porting an application to MS-Windows
- References:
- Having trouble porting an application to MS-Windows
- From: Bob McConnell
- Re: Having trouble porting an application to MS-Windows
- From: Chas Owens
- RE: Having trouble porting an application to MS-Windows
- From: Bob McConnell
- Re: Having trouble porting an application to MS-Windows
- From: Chas Owens
- Re: Having trouble porting an application to MS-Windows
- From: Chas Owens
- RE: Having trouble porting an application to MS-Windows
- From: Bob McConnell
- Re: Having trouble porting an application to MS-Windows
- From: Chas Owens
- Having trouble porting an application to MS-Windows
- Prev by Date: Why am I getting the error (Maybe you meant system() when you said exec()?) ??
- Next by Date: Re: Having trouble porting an application to MS-Windows
- Previous by thread: Re: Having trouble porting an application to MS-Windows
- Next by thread: Re: Having trouble porting an application to MS-Windows
- Index(es):
Relevant Pages
|