Re: system() with timeout

2009-04-17 Thread Matt Lawrence
David Cantrell wrote: On Thu, Apr 16, 2009 at 07:44:39PM +0100, David Cantrell wrote: On Thu, Apr 16, 2009 at 06:32:08PM +0100, Paul LeoNerd Evans wrote: On Thu, Apr 16, 2009 at 06:18:45PM +0100, David Cantrell wrote: Anyone recommend a module to give me something like

Re: system() with timeout

2009-04-17 Thread Nicholas Clark
On Fri, Apr 17, 2009 at 09:24:01AM +0100, Matt Lawrence wrote: I recently discovered that die() inside a signal handler causes a memory leak. I don't know if that would be a problem for you in this case. Hmm, that's not good. Have you been able to nail it down sufficiently to make a bug

Re: system() with timeout

2009-04-17 Thread Matt Lawrence
Nicholas Clark wrote: On Fri, Apr 17, 2009 at 09:24:01AM +0100, Matt Lawrence wrote: I recently discovered that die() inside a signal handler causes a memory leak. I don't know if that would be a problem for you in this case. Hmm, that's not good. Have you been able to nail it down

Re: system() with timeout

2009-04-17 Thread David Cantrell
On Fri, Apr 17, 2009 at 09:24:01AM +0100, Matt Lawrence wrote: David Cantrell wrote: I ended up doing ... eval { if(my $pid = fork()) { # parent local $SIG{ALRM} = sub { kill 9, $pid; # quit RIGHT FUCKING NOW die(Child process timed

Re: system() with timeout

2009-04-17 Thread Aaron Crane
Matt Lawrence writes: I recently discovered that die() inside a signal handler causes a memory leak.[...] I guess that might be related to the problem you were having before timing out system(). Unlikely. Internally, system() forks a child process which execs a suitable program. The parent

Re: system() with timeout

2009-04-17 Thread Chisel Wright
On Fri, Apr 17, 2009 at 11:25:54AM +0100, Matt Lawrence wrote: I haven't had a chance to test any of this on the latest perl, 5.8.8 is the latest I've tried it with. Odd, I'm on 5.8.8 and don't seem to be seeing the same behaviour: $ perl sigdie.pl [1] 14327 $ ps -Fp 14327 UIDPID

Re: system() with timeout

2009-04-17 Thread Matt Lawrence
Aaron Crane wrote: Matt Lawrence writes: I recently discovered that die() inside a signal handler causes a memory leak.[...] I guess that might be related to the problem you were having before timing out system(). Unlikely. [...] There's an additional problem when the underlying

Re: system() with timeout

2009-04-17 Thread Matt Lawrence
Chisel Wright wrote: On Fri, Apr 17, 2009 at 11:25:54AM +0100, Matt Lawrence wrote: I haven't had a chance to test any of this on the latest perl, 5.8.8 is the latest I've tried it with. Odd, I'm on 5.8.8 and don't seem to be seeing the same behaviour: [...] Oooh, but

Re: system() with timeout

2009-04-17 Thread Chisel Wright
On Fri, Apr 17, 2009 at 12:30:17PM +0100, Matt Lawrence wrote: I've just verified that both cases leak on my system. Is it definitely the same version of perl in each case? Good point. perl == /opt/.../bin/perl It's compiled in-house, v5.8.8 /usr/bin/perl is the system perl:

Re: system() with timeout

2009-04-17 Thread Nicholas Clark
On Fri, Apr 17, 2009 at 11:25:54AM +0100, Matt Lawrence wrote: Nicholas Clark wrote: On Fri, Apr 17, 2009 at 09:24:01AM +0100, Matt Lawrence wrote: I recently discovered that die() inside a signal handler causes a memory leak. I don't know if that would be a problem for you in this

Perl on JVM Slides

2009-04-17 Thread Ovid
Hi all, Last night's tech talks had a very interesting talk about Perl on the JVM. Are those slides available anywhere? Cheers, Ovid -- Buy the book - http://www.oreilly.com/catalog/perlhks/ Tech blog- http://use.perl.org/~Ovid/journal/ Twitter -

Unicode to Hex - Pack possibly?

2009-04-17 Thread abhishek jain
Hi,I need to convert a text written in Devanagari (Hindi) Language into Hexadecimal language. I know we can do in perl , possibly with pack / unpack but not how to do so Can anyone here help? -- Thanks and kind Regards, Abhishek jain 07799 328 727 skype: ejaincom

Re: Unicode to Hex - Pack possibly?

2009-04-17 Thread James Laver
On 17 Apr 2009, at 16:11, abhishek jain wrote: Hi,I need to convert a text written in Devanagari (Hindi) Language into Hexadecimal language. I know we can do in perl , possibly with pack / unpack but not how to do so Can anyone here help? You're going to have to be a bit more specific

Re: Unicode to Hex - Pack possibly?

2009-04-17 Thread Matt Lawrence
James Laver wrote: On 17 Apr 2009, at 16:11, abhishek jain wrote: Hi,I need to convert a text written in Devanagari (Hindi) Language into Hexadecimal language. I know we can do in perl , possibly with pack / unpack but not how to do so Can anyone here help? You're going to have to be a bit

Re: Perl on JVM Slides

2009-04-17 Thread Ben Evans
Ovid wrote: Last night's tech talks had a very interesting talk about Perl on the JVM Are those slides available anywhere? I don't know if Leon's put them up anywhere yet. If not, mail me offlist and I'll send you a copy. While I'm here - if anyone (whether an attendee at last night's

Re: Perl on JVM Slides

2009-04-17 Thread Andy Armstrong
On 17 Apr 2009, at 19:47, Ben Evans wrote: Ovid wrote: Last night's tech talks had a very interesting talk about Perl on the JVM Are those slides available anywhere? I don't know if Leon's put them up anywhere yet. If not, mail me offlist and I'll send you a copy. While I'm here - if

Re: Perl on JVM Slides

2009-04-17 Thread Gabriel Vieira
On Fri, Apr 17, 2009 at 8:31 PM, Andy Armstrong a...@hexten.net wrote: On 17 Apr 2009, at 19:47, Ben Evans wrote: Ovid wrote: Last night's tech talks had a very interesting talk about Perl on the JVM  Are those slides available anywhere? I don't know if Leon's put them up anywhere yet.