Thus spake Bernard Li ([EMAIL PROTECTED]):
Hey Brian:

I can check the code into trunk, but I think my focus right now would be to get 
this running with SystemImager, so I don't know if I will have time to test to 
see if the transport works with standalone flamethrower...  is that going to be 
a problem?

Not initially.  I don't anticipate doing a release from the flamethrower
trunk anytime soon, so I'm not too worried about it.

Also, I would expect that your BT mods to flamethrower are feature
additions, and should not break existing functionality, even during
development.  But even if it does, go ahead and use trunk for the
flamethrower stuff in this case.


Regarding my issue, it appears to be caused by the fact that I have a bunch of 
system() calls within maketorrent() - I don't think that plays well with 
fork/cast...  I'll have to look deeper into the code - if you have any 
suggestions, please let me know.

Will take a look after you check it in.

Cheers, -Brian



Thanks,

Bernard

________________________________

From: Brian Elliott Finley on behalf of Brian Elliott Finley
Sent: Sat 31/12/2005 11:19
To: Bernard Li
Subject: Re: Help with flamethrowerd



Go ahead and check your code into the flamethrower trunk.

I'm betting that what you're getting stuck on is a perl fork related concept.

I've attached a very simple forking perl daemon as an example.

Again, please send these to the -devel list too.  Others may have good
feedback on things like this also.

Cheers, -Brian



Thus spake Bernard Li ([EMAIL PROTECTED]):
Hi Brian:

I'm integrating the BitTorrent transport into Flamethrower and could use your 
help explaining the cast() subrountine in flamethrowerd.

Instead of running "build_udp_sender_cmd", I created a new subrountine called 
"build_bittorrent_cmd" which calls the bittorrent-console command.  This command is used 
to seed the torrent and is expected to be started when flamethrowerd is started and not stopped 
until flamethrowerd is stopped.

I have added a call to subroutine maketorrent() which creates the torrent 
inside the cast subroutine which is called prior to build_bittorrent_cmd().

Here's the code snippet from cast():

   # Make torrent if using the BitTorrent transport
   if ($transport eq "bittorrent") {
       maketorrent($module);
   }
   # Fork and cast
   if ($parent_pid = fork) {
       record_pid($parent_file, $parent_pid);
   } elsif (defined $parent_pid) { # send the forked child off
       setsid or die "Can't start a new session: $!";
       print "casting $module\n" if($debug);
       my $cmd = "";
       if ($transport eq "bittorrent") {
           $cmd = build_bittorrent_cmd($module);
       } else {
           $cmd = build_udp_sender_cmd($module);
       }

It basically loops through each module, making the torrent and seeding it, 
however, it gets stuck in the middle until I kill the process of the previous 
module (the pid is recorded in /var/state/systemimager/flamethrower).

Perhaps if I understand the cast() subroutine better, then I will be able to 
figure this out.

Thanks,

Bernard

--
Brian Elliott Finley
Mobile:  630.631.6621



--
Brian Elliott Finley
Mobile:  630.631.6621


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Sisuite-devel mailing list
Sisuite-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sisuite-devel

Reply via email to