bug-parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU Parallel Bug Reports --tmux does not pass locale correctly (needed s


From: Matti Niemenmaa
Subject: GNU Parallel Bug Reports --tmux does not pass locale correctly (needed since tmux 2.2)
Date: Sat, 15 Apr 2017 22:04:03 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

Hi,

--tmux doesn't work for me at all as of tmux 2.2. The "Maximal used size of command" is computed incorrectly and so no command can be run:

$ parallel --tmux --show-limits echo ::: x
Maximal size of command: 131049
Maximal used size of command: -16

Execution of  will continue now, and it will try to read its input
and run commands; if this is not what you wanted to happen, please
press CTRL-D or CTRL-C
parallel: Error: Command line too long (6 >= -16) at input 0: x

$ parallel --version
Copyright (C) 2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017
Ole Tange and Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
GNU parallel comes with no warranty.

Web site: http://www.gnu.org/software/parallel

When using programs that use GNU Parallel to process data for publication please cite as described in 'parallel --citation'.

$ tmux -V
tmux 2.3

The reason for the failure is that the call to tmux in Limits::Command::tmux_length results in tmux silently failing because it doesn't have the necessary locale information. This can be reproduced outside GNU parallel:

$ LANG= LC_ALL= LC_CTYPE= tmux
tmux: need UTF-8 locale (LC_CTYPE) but have ANSI_X3.4-1968

(The above tmux command works with tmux 2.1, but not tmux 2.2 or 2.3.)

The underlying cause within GNU parallel is that ::qqx is used to call tmux, and ::qqx strips out locale information from the environment.

Note that everything will seem to work if you have the en_US.UTF-8 locale available, because tmux will fall back to that in the absence of locale information. On my system that locale is not installed, which culminates in the failure.

Adding LC_CTYPE to @keep inside ::qqx fixes the issue.

— Matti



reply via email to

[Prev in Thread] Current Thread [Next in Thread]