in reply to Re^4: DBI and fork() on Win32
in thread DBI and fork() on Win32
You need to be a bit more precise because the following Works On My Machine:
#!perl -w use strict; use DBI; my $dsn = 'dbi:SQLite:dbname=tmp.sqlite'; while (1) { my $dbh = DBI->connect($dsn,undef,undef,{RaiseError => 1}); # Parent + connecting # .. get a job list .. my @jobs = qw(Corion FloydATC FloydATD); $dbh->disconnect(); # <-- NB! foreach my $job (@jobs) { my @cmd = ($^X, '-le', q{"print 'Processing ', join '_', @ARGV"}, +$job); system(1, @cmd); } sleep 1; } print "Done.";
Of course, I'm not really doing anything with the DBI handle, but maybe you can try my version and then work your way up to your version.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: DBI and fork() on Win32
by jand (Friar) on Feb 10, 2009 at 19:50 UTC | |
by FloydATC (Deacon) on Feb 10, 2009 at 21:42 UTC | |
|
Re^6: DBI and fork() on Win32
by FloydATC (Deacon) on Feb 10, 2009 at 17:35 UTC |