CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Advanced:
Threads gone mad !


New User

Jun 2, 2004, 7:15 AM

Post #1 of 1 (939 views)
Threads gone mad ! Can't Post

 Hey guys,

I'm working on a project to get my degree in IT. My project is about testing computer hardware and
generating reports. So far, all is going well, except for threads.
I've created the menu with Curses::UI.

I want to be able to perform multiple CPU tests at the same time (I've code the modules, programmes etc already).
I'll give you a simple example, just to make my point:

**Module Test:
# ... CODE ...
sub TEST {
threads->new(\&TEST, "Test::badblocks");
threads->new(\&TEST, "Test::memtest");
# ... CODE ...

**Module Test::badblocks / Test::memtest
sub test {
for (1..15) {
print STDERR "memtest\n"; #Same thing for badblocks
sleep 1;

Well, let's get to the difficult part, shall we :-)
When I netboot this thing here (using PXELINUX, but that does not matter here), it won't thread!
It'll just hang for almost a minute, than print 15x badblocks, than waits for almost 10 seconds and than prints
15x memtest.

When I mount the netboot environment (located on my server) locally, and chroot to it, and from there run
the script, than it'll work (meaning: it prints: badblocks, memtest, badblocks, memtest, ...)

Now my question is, what is the problem here?
Also: when I do an thread->detach() I get this nasty error:
Inappropriate ioctl for device at line .... < line where detach() is on.



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives