Hi, Markus
you could try aliasing your childs STDERR to a file
open (STDERR, ">", "stderr.$$") or die("eek");
the parent will know the pid of the child if you fork() or you can use the
$thread->tid and threads->self->tid methods instead of $$.
The normal unix-style open with an argument of -| isn't supported on windows
yet...
Kind regards,
Mark Anderson
Service Improvement Programme
Level 2, 113 Dundas Street
Edinburgh, EH3 5DE
Tel: 0131 523 8786
Mob: 07808 826 063
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [SMTP:[EMAIL PROTECTED] On Behalf Of
> Markus
> Sent: Wednesday, April 20, 2005 7:56 PM
> To: [email protected]
> Subject: propper handling if a child thread die
>
> *** WARNING : This message originates from the Internet ***
>
>
>
> Greetings,
>
>
>
> I'm using the module "threads" and "threads::shared".
>
> If a thread finishing unexpected is generating a message on STDERR.
>
> Is possible to intercept the message by the main thread and suppress on
> STDERR?
>
>
>
> Here a piece of code, which uses the thread:
>
> open FTPFILE,"> $fileName.NOS" or die "Error: can not create file
> \"$fileName.NOS\"!";
>
>
>
> This generate following message:
>
> thread failed to start: Error: can not open file "s:s.CLI"! at
> C:\Perl\scripts\NVR\pwChange\pwchange.pl line 554.
>
>
>
> Regards,
>
> Markus
> << File: ATT602823.txt >>
The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered
Office: 36 St Andrew Square, Edinburgh EH2 2YB
The Royal Bank of Scotland plc is authorised and regulated by the Financial
Services Authority and represents The Royal Bank of Scotland Marketing Group.
The Bank sells life policies, collective investment schemes and pension
products and advises only on the Marketing Group's range of these products and
on a With-Profit Bond produced by Norwich Union Life (RBS) Limited.
This e-mail message is confidential and for use by the addressee only. If the
message is received by anyone other than the addressee, please return the
message to the sender by replying to it and then delete the message from your
computer. Internet e-mails are not necessarily secure. The Royal Bank of
Scotland plc does not accept responsibility for changes made to this message
after it was sent.
Whilst all reasonable care has been taken to avoid the transmission of viruses,
it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will not
adversely affect its systems or data. No responsibility is accepted by The
Royal Bank of Scotland plc in this regard and the recipient should carry out
such virus and other checks as it considers appropriate.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs