su -c adds ESC%G

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

 



Hi,

On redhat 8.0. This issue has certainly to do with utf-8. I don't know 
where to report it in bugzilla, as it may be a su issue, a glibc issue,
a kernel issue ? or even a non issue (but I doubt it).

I have glibc-2.2.93-5 kernel-2.4.18-17.8.0 sh-utils-2.0.12-3

When on a tty I do
$su - snfs -c "echo nothing" > /root/test

in /root/test, I have
ESC%Gnothing
The same happen in boot scripts but not on xterms. (note that I don't run X
as root, but I do a su - to root before doing my tests).

I think that ESC%G is the escape sequence telling the console to go in 
utf-8 mode or the like. I don't have this issue on an xterm

Another similar test:
$(set -x;test=`su - snfs -c "echo nothing"`; echo $test) 2>/root/set_test
in /root/set_test, there is:
+ set -x
++ su - snfs -c 'echo nothing'
+ test=ESC%Gnothing
+ echo $'\E%Gnothing'

locale gives
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=

To work around those issues, I changed to su snfs instead of su - snfs, but
this might be an issue to solve.

Pat



_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux