crash on async in taint mode

Discussion in 'Perl Misc' started by Yohan N. Leder, Jun 28, 2006.

  1. To replace a fork() which crashes ActivePerl 5.8.8 in taint mode, I've
    tried to go through creation of a thread... And it crashes too !

    #!/usr/bin/perl -wT
    use threads;
    print "Content-type: text/html\n\n";
    my $thr = async{print "<p>thread in progress...</p>"};
    die "thread failure\n" unless defined($thr);
    $thr->detach();
    sleep(1);
    print "<p>main in progress...</p>";
    exit 0;

    ActivePerl falls in exception on async{} block.
    What's wrong again ?
    Yohan N. Leder, Jun 28, 2006
    #1
    1. Advertising

  2. Yohan N. Leder wrote:
    > To replace a fork() which crashes ActivePerl 5.8.8 in taint mode, I've
    > tried to go through creation of a thread... And it crashes too !
    >
    > #!/usr/bin/perl -wT
    > use threads;
    > print "Content-type: text/html\n\n";
    > my $thr = async{print "<p>thread in progress...</p>"};
    > die "thread failure\n" unless defined($thr);
    > $thr->detach();
    > sleep(1);
    > print "<p>main in progress...</p>";
    > exit 0;
    >
    > ActivePerl falls in exception on async{} block.
    > What's wrong again ?


    Windows doesn't have a real fork(). It is emulated with threads, so I
    suspect you are seeing the same bug.
    Brian McCauley, Jun 29, 2006
    #2
    1. Advertising

  3. Yohan N. Leder

    Ben Morrow Guest

    Quoth "Brian McCauley" <>:
    >
    > Yohan N. Leder wrote:
    > > To replace a fork() which crashes ActivePerl 5.8.8 in taint mode, I've
    > > tried to go through creation of a thread... And it crashes too !
    > >
    > > #!/usr/bin/perl -wT
    > > use threads;
    > > print "Content-type: text/html\n\n";
    > > my $thr = async{print "<p>thread in progress...</p>"};
    > > die "thread failure\n" unless defined($thr);
    > > $thr->detach();
    > > sleep(1);
    > > print "<p>main in progress...</p>";
    > > exit 0;
    > >
    > > ActivePerl falls in exception on async{} block.
    > > What's wrong again ?

    >
    > Windows doesn't have a real fork(). It is emulated with threads, so I
    > suspect you are seeing the same bug.


    http://perlmonks.org/index.pl?node_id=547313

    Ben

    --
    'Deserve [death]? I daresay he did. Many live that deserve death. And some die
    that deserve life. Can you give it to them? Then do not be too eager to deal
    out death in judgement. For even the very wise cannot see all ends.'
    Ben Morrow, Jun 29, 2006
    #3
  4. In article <>,
    says...
    >
    > Yohan N. Leder wrote:
    > > To replace a fork() which crashes ActivePerl 5.8.8 in taint mode, I've
    > > tried to go through creation of a thread... And it crashes too !
    > >
    > > #!/usr/bin/perl -wT
    > > use threads;
    > > print "Content-type: text/html\n\n";
    > > my $thr = async{print "<p>thread in progress...</p>"};
    > > die "thread failure\n" unless defined($thr);
    > > $thr->detach();
    > > sleep(1);
    > > print "<p>main in progress...</p>";
    > > exit 0;
    > >
    > > ActivePerl falls in exception on async{} block.
    > > What's wrong again ?

    >
    > Windows doesn't have a real fork(). It is emulated with threads, so I
    > suspect you are seeing the same bug.
    >
    >


    Thanks. Then, it sounds I have to go through Win32::process as you said
    in the other thread.
    Yohan N. Leder, Jun 29, 2006
    #4
  5. In article <>,
    says...
    > http://perlmonks.org/index.pl?node_id=547313
    >
    > Ben
    >


    OK, posted : "fork() and async{} with "use threads", both crash on
    ActivePerl 5.8.8 build 817 with Apache2 under Windows 2000 Pro FR SP4"
    on the page you gave. Unless going through Win32::process, do you know a
    work-around ?
    Yohan N. Leder, Jun 30, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Johann C. Rocholl

    Taint (like in Perl) as a Python module: taint.py

    Johann C. Rocholl, Feb 5, 2007, in forum: Python
    Replies:
    5
    Views:
    465
    Johann C. Rocholl
    Feb 6, 2007
  2. sekdab

    Taint Mode Newbie Help

    sekdab, Jul 19, 2003, in forum: Perl Misc
    Replies:
    2
    Views:
    122
    sekdab
    Jul 19, 2003
  3. Louis Erickson
    Replies:
    2
    Views:
    197
    James Willmore
    Sep 3, 2003
  4. Ben
    Replies:
    17
    Views:
    221
  5. Yohan N. Leder

    crash on fork in taint mode

    Yohan N. Leder, Jun 27, 2006, in forum: Perl Misc
    Replies:
    5
    Views:
    93
    Brian McCauley
    Jun 29, 2006
Loading...

Share This Page