On Tue, 2017-05-02 at 16:51 +0200, Robin Jarry wrote:
> Replacing sys.stdout and sys.stderr can cause obscure crashes when
> trying to write non unicode data. The interpreter is terminated with
> SIGINT without any specific error writen on the console.
> 
>   rt_sigaction(SIGINT, {SIG_DFL, [], SA_RESTORER, 0x7f964820e8d0},
>   {0x559f50, [], SA_RESTORER, 0x7f964820e8d0}, 8) = 0
> 
> This happens easily when there is an untrapped exception which should
> lead to printing a traceback on stderr.
> 
> The only way to prevent UnicodeEncodeErrors is to make sure that one
> of
> the locale-related environment variables (LC_ALL, LANG, LANGUAGE,
> etc.)
> is set. Python will use the correct encoding accordingly.
> 
> Add a note about this on `pwclient --help`. Also, display a help
> message
> when an encoding error occurs.
> 
> Fixes: 046419a3bf8f ("pwclient: Fix encoding problems")
> Signed-off-by: Robin Jarry <[email protected]>

Spot on. Moved the help message to the epilog and applied. Thanks,
Robin :)

Stephen

_______________________________________________
Patchwork mailing list
[email protected]
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to