Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

win32 forking and threads

by Anonymous Monk
on Jul 17, 2002 at 04:54 UTC ( [id://182330]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

hi. i have an ftp program that will automatically upload and download from a site every hour. i have a win32::gui frontend for it so when it starts uploading or downloading the gui effectively freezes until its finished.

in the upload and download subroutine i tried putting in

if ($pid = fork) { #upload and download } else { print "error forking: $!\n"; }

but when i try to run it i get an error saying bizarre svtype 30.

so then i tried using threads but i'm told that this perl was built for use with ithreads. and i read perldoc Thread which says the same thing, so then how do i use ithreads?

i'm running activestate perl 5.6.1.631 and 5.6.1 compiled with the USE_MULTI, USE_ITHREADS and USE_IMP_SYS flags on windows 98se. it does the same thing on both builds.

thanx in advance

Replies are listed 'Best First'.
Re: win32 forking and threads
by NaSe77 (Monk) on Jul 17, 2002 at 07:38 UTC
    on win(2000) I tent not to use "fork" but "Win32::Process::Create"

    in my experience that works great ... perhaps it will also work for you

    ----
    NaSe
    :x

Re: win32 forking and threads
by IlyaM (Parson) on Jul 17, 2002 at 07:28 UTC
Re: win32 forking and threads
by dada (Chaplain) on Jul 18, 2002 at 13:52 UTC
    which version of Win32::GUI are you using? version 0.0.665 should play fair with forks.

    cheers,
    Aldo

    __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://182330]
Approved by Kanji
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-16 15:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found