Hello,
Thanks for the nice tool!
I encountered a minor problem when using it in GNU parted
when I ran "make >& log &".  It caused the build to hang.

Here's a stand-alone demo:

Before the fix, it hangs:

  $ touch x.1; po4a-updatepo -f man -m x.1 -p x.pot >& log &
  [6] 1383
  $
  [6]  + suspended (tty output)  po4a-updatepo -f man -m x.1 -p x.pot >&log

With the following patch, it completes as you would expect:

2007-02-14  Jim Meyering  <[EMAIL PROTECTED]>

        Don't hang when running in background with redirected stdout.
        * lib/Locale/Po4a/Common.pm (BEGIN): Don't try to determine output
        terminal size when STDOUT is not a terminal.

Index: lib/Locale/Po4a/Common.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Common.pm,v
retrieving revision 1.14
diff -u -p -r1.14 Common.pm
--- lib/Locale/Po4a/Common.pm   6 Dec 2005 16:32:06 -0000       1.14
+++ lib/Locale/Po4a/Common.pm   14 Feb 2007 16:11:39 -0000
@@ -1,7 +1,7 @@
 # Locale::Po4a::Common -- Common parts of the po4a scripts and utils
 # $Id: Common.pm,v 1.14 2005/12/06 16:32:06 jvprat-guest Exp $
 #
-# Copyright 2005 by Jordi Vilalta <[EMAIL PROTECTED]>
+# Copyright 2005, 2007 by Jordi Vilalta <[EMAIL PROTECTED]>
 #
 # This program is free software; you may redistribute it and/or modify it
 # under the terms of GPL (see COPYING).
@@ -35,7 +35,7 @@ BEGIN {
     
         # Don't bother determining the wrap column if we cannot wrap.
         my $col=$ENV{COLUMNS};
-        if (!defined $col) {
+        if (!defined $col && -t STDOUT) {
             my @term=eval "use Term::ReadKey; 
Term::ReadKey::GetTerminalSize()";
             $col=$term[0] if (!$@);
             # If GetTerminalSize() failed we will fallback to a safe default.

_______________________________________________
parted-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/parted-devel

Reply via email to