@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24



Comments:

<0> hmm
<1> I fought with your father during the join floods
<0> but you told me you were my father
<2> I have a perl question regarding forking and then closing sockets in the child process that were inherited from the parent process.
<2> if anyone's interested
<3> you're trying to close it in the child and it's not closing?
<4> g'night all
<2> not exactly. You see I run the perl program from an php script that ran from apache. since apache had ports 80 and 443 open the Perl process inherited these. Then the child inherits them. However, the child may run for several days and when apache trys to rotate it's logs it can't start backup because port 80 and 443 are still bound by the child process of the Perl program.
<2> So I don't have the handle name of the socket to close in the child process or the parent
<5> close(\*STDIN) maybe?
<3> uh, PHP isn't marking them close-on-exec? that's really frightening...
<3> close(STDERR) too
<5> and out...
<3> there's a whole procedure for "daemonizing" a program... you probably want to do that... if as you said, it's going to run for several days
<2> yes I'm closing STDIN, STDOUT and STDERR.. in the child process but those are only file descriptors and I don't think they will close the 80 and 443 sockets
<3> http://perldesignpatterns.com/?DaemonProcess



<3> I don't think 80 and 443 are available to you... that would be a huge security breach, and surely Apache would close-on-exec them
<3> but it may be that Apache can't rotate its logs as long as it has children CGIs still running... try daemonizing
<3> you want to do that anyway
<3> if the problem persists, ask again
<5> I would agree with scrottie. Especially PHP, it can't be _that_ dumb that it actually p***es the sockets to stuff that it runs
<1> you could pipe the Apache logs to something more intelligent that doesn't require rotation afterwards
<3> note that if the first thing the Perl program does is exec another Perl program, things *will* close on exec
<6> Mother of god pirate bay is going fast
<2> I ran the script and then stopped apache.. confirmed no apache processes and ran netstat...
<2> tcp6 38 0 localhost:https localhost:52719 CLOSE_WAIT 4040/perl
<2> also when i run lsof to see open files decriptors on the perl process it lists the folloowing:
<2> vim 459 atippett 3u unix 0xdf5d0a60 2520445 socket
<2> vim 459 atippett 5u unix 0xdf5d00c0 2520457 socket
<2> which I believe are 80 and 443
<7> Why?
<5> mave11: no, they're unix sockets, it says so right there
<1> why would vim have ports open?
<5> mave11: a TCP socket would list like "IPv4 XXXX TCP foo:2894 bar:80 (ESTABLISHED)"
<1> or is Sony releasing vim now for folks working on music players?
<2> i got the wrong process id i think
<5> I'd say so :)
<8> how do i find the length of a string
<9> tainted-: well.. that would be the command... umm... length of all things. :)
<8> as in length(string) ?
<9> tainted-: as in perldoc -f length
<8> perldoc -f length
<8> nothing
<9> tainted-: at your command line..
<8> c:\perldoc.exe -f length
<8> still nothing...
<1> http://perldoc.perl.org/functions/length.html
<9> tainted-: well.. find the perldoc program on your system them
<9> s/them/then/
<5> why would it be in C:\ ?
<8> b/c d:\ is my music files
<1> yeah, I use P:\
<8> and e:\ is my cd drive
<8> i'm sure it's not in my cd drive
<1> 1960's drive technology can't be wrong
<8> my cup of water is there
<9> tainted-: so you put all your executable files in the root dir of your drive?
<8> otherwise i'd have to use DOSKEY and specify PATH
<8> and that is _such_ a pain
<10> hey guys, is there anyway to do this? my $time = pop(@{split(/\s+/,$_)}); this isn't working how I would expect.
<5> (split /\s+/, $_)[0]
<5> er, [-1]
<10> hobbs, yep yep thanks :)
<5> simpler too :)
<10> indeed ;)
<5> pop only works on an array, not a list. Lists are immutable.
<10> hobbs, so when i pop an array it gets the last element, does it take (remove) it from the array?
<5> RiX: yes
<10> that is what i thought :)
<6> Yay!
<10> ??
<5> CELEBRATE GOOD TIMES C'MON!
<6> Exactly.
<6> hobbs: I've been eliciting sympathy for you at my job
<6> "Poor guy is stuck out in west bum**** pennsylvania, can't even get broad band.."
<5> haha
<5> I've heard of EBF, but never WBF ;)



<10> lol... dialup suxors ;) CONNECT 33333/ARQ/V92/LAPM/V42BIS
<10> thats my current speed
<6> hobbs: It's a new one!
<5> although apparently the more common usage in other parts is BFE
<10> yeah i live around bfe too :)
<6> Er, BFE?
<5> I think EBF is actually located in New Jersey
<6> I've always heard direction->bf
<11> v42BIS.
<5> buu: E==Egypt
<11> God that brings back memories.
<5> ew73: Me too. Memories of the last time my connection dropped. Earlier today. :)
<10> indeed ;)
<11> I USE ZMODEM TO DOWNLOADZ THE PR()NZ LOL
<12> you ever notice that when you're traveling in your car at, say, around 80 mph, and you throw something out your window, something like a rabbit or other small thing, that it keeps up with you and doesn't slow down much, until it goes splat?
<5> but my mama taught me "east butt****" and that's what you're getting :)
<13> you still here scrottie?
<5> Chris62vw: that sounds a lot like a Steven Wright
<11> Chris62vw: Of course. THere's not much besides air to slow it down.
<12> hobbs, really? because I just tossed a beer bottle out my window, so I didn't make that up :-)
<12> ew73, exactly. for some reason, my feeble mind found that interesting
<12> you can look at what you throw out the window and see every second of its flight, even while going 100 mph
<5> Chris62vw: I guess it was mostly the "something like a rabbit or other small thing"
<6> I saw a qdb quote earlier
<6> It had 'pr0k'
<6> I felt all warm and fuzzy.
<12> whats pr0k
<6> p0rk
<1> the other white meat
<6> Yar.
<14> good to see thrig around still...and buu...
<6> Hello pete.
<6> I see I get periods =[
<14> has perl 6 been released yet or what?
<15> sup C?
<15> hahah rpete - good one
<14> suppose that's a faq, nevermind
<12> hi Daveman
<12> rpete, it was released three summers ago, just like they said. wait, no it wasn't...
<6> rpete: hahaha never.
<6> "Christmas"
<10> is there an easy way to add all the values in an array?
<5> use List::Util qw(sum); sum(@stuff)
<14> my $sum=0; $sum+=$_ for @array; although Util::List probably has something fancier
<14> there you go then
<10> hobbs, is that a built in module?
<12> my $sum = eval join "+", @array; # **** you guys
<5> RiX: you tell me. It's not nearly as important as you think anyway :)
<12> no it is not. just use rpete's way and move on with your life :-)
<12> however, you should have List::Util installed on your box(en) anyway
<12> considering you should be a true perl hacker by now
<6> do { local$"='+';eval"@ar" }
<6> I'M BETTER.
<12> not bad, not bad
<13> is this Perl_get_sv function part of the perl interface for an so?
<11> eval: 255 * .6
<16> ew73: Return: 153
<12> you basically stole my idea. not bad, not bad
<6> ?eval [+] (1..10);
<6> ****ing cunt
<13> and is it supposed to be in libperl.so under CORE ...
<6> ?eval [+] (1..10);
<6> TALK BACK COCK ****ER.
<11> You mamma.
<6> ?eval 1
<17> 55
<6> Finally.
<12> tu madre, puty
<12> puto
<17> 1
<6> perl6 ftw
<18> is it running pugs?
<19> Yes


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

#suse
#math
cargol problem iso
ubuntu hlp files
#perl
difference between i383 i686
treetagger gentoo
#linux
ipod mount linux permission denied
egonis



Home  |  disclaimer  |  contact  |  submit quotes