Skip Menu |

This queue is for tickets about the Tk CPAN distribution.

Report information
The Basics
Id: 6351
Status: resolved
Priority: 0/
Queue: Tk

People
Owner: Nobody in particular
Requestors: QOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 804.026
Fixed in: 804.026



Subject: fork
$_@_.%_ writes: Show quoted text
> slaven@rezic.de (Slaven Rezic) wrote in message-id: > <50ce5237.0405170507.2b6c0ea0@posting.google.com>
> > > >etwas@rambler.ru (alex) wrote in message news:<f1654762.0405101424.786971fc@posting.google.com>...
> >> > > >> > You have to exit the child process with CORE::exit(): > >> > > >> > if (fork == 0) { CORE::exit() } > >> > > >> > There's also a bug in Tk804.025 and Tk804.026 which even makes using > >> > POSIX::_exit() necessary. > >> > > >> > Regards, > >> > Slaven
> >> > >> tried all: > >> if (fork == 0) { CORE::exit() } > >> if (fork == 0) { POSIX::_exit() } > >> if (fork == 0) { POSIX::exit() } > >> > >> program just quietly died.
> > > >To clarify: does the following perl script work (it works on Linux > >with 800.025 and 804.027)? > > > >#!/usr/bin/perl > >use Tk; > >$mw = tkinit; > >warn $Tk::VERSION; > >$mw->update; > >if (fork == 0) { > > CORE::exit; > >} > >MainLoop; > >__END__ > > > >Regards, > > Slaven
> > This script produces the following error: > > C:\DOCUME~2\ADMINI~1\Desktop>ver > > Microsoft Windows 2000 [Version 5.00.2195] > > C:\DOCUME~2\ADMINI~1\Desktop>tkfork > 804.027 at C:\DOCUME~2\ADMINI~1\Desktop\tkfork.pl line 4. > > ========================================================================= > | The instruction at "0x28087393" referenced memory at "0x00000000". | > | The memory could not be "written". | > | | > | Click on OK to terminate the program | > | Click on CANCEL to debug the program | > | | > | [OK] [Cancel] | > ========================================================================= >
I think it's best to report the bug on http://rt.cpan.org . Regards, Slaven
On 2004-05-18 15:06:52, guest wrote: Show quoted text
> $_@_.%_ writes: >
> > slaven@rezic.de (Slaven Rezic) wrote in message-id: > > <50ce5237.0405170507.2b6c0ea0@posting.google.com>
> > > > > > etwas@rambler.ru (alex) wrote in message > > > news:<f1654762.0405101424.786971fc@posting.google.com>...
> > >> > > > >> > You have to exit the child process with CORE::exit(): > > >> > > > >> > if (fork == 0) { CORE::exit() } > > >> > > > >> > There's also a bug in Tk804.025 and Tk804.026 which even makes > > >> > using > > >> > POSIX::_exit() necessary. > > >> > > > >> > Regards, > > >> > Slaven
> > >> > > >> tried all: > > >> if (fork == 0) { CORE::exit() } > > >> if (fork == 0) { POSIX::_exit() } > > >> if (fork == 0) { POSIX::exit() } > > >> > > >> program just quietly died.
> > > > > > To clarify: does the following perl script work (it works on Linux > > > with 800.025 and 804.027)? > > > > > > #!/usr/bin/perl > > > use Tk; > > > $mw = tkinit; > > > warn $Tk::VERSION; > > > $mw->update; > > > if (fork == 0) { > > > CORE::exit; > > > } > > > MainLoop; > > > __END__ > > > > > > Regards, > > > Slaven
> > > > This script produces the following error: > > > > C:\DOCUME~2\ADMINI~1\Desktop>ver > > > > Microsoft Windows 2000 [Version 5.00.2195] > > > > C:\DOCUME~2\ADMINI~1\Desktop>tkfork > > 804.027 at C:\DOCUME~2\ADMINI~1\Desktop\tkfork.pl line 4. > > > > ========================================================================= > > | The instruction at "0x28087393" referenced memory at "0x00000000". > > | > > | The memory could not be "written". > > | > > | > > | > > | Click on OK to terminate the program > > | > > | Click on CANCEL to debug the program > > | > > | > > | > > | [OK] [Cancel] > > | > > ========================================================================= > >
> > I think it's best to report the bug on http://rt.cpan.org . >
Currently all systems with modern perls (5.16+) have problems with forked children. The best workaround is to avoid using exit or CORE::exit, and instead to use POSIX::_exit(0), or to fork the child processes before opening Tk windows. See also RT #100399 and commit 643f7446ab4c457efac4c2527cf893502d0a3b62 Closing this issue nevertheless, even if it's not really resolved...