os.execute() commands in rc.lua fail if shell envvar is incorrect
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
awesome (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: awesome
1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu.
Description: Ubuntu 10.04.1 LTS
Release: 10.04
2) The version of the package you are using, via 'apt-cache policy packagename' or by checking in Synaptic.
awesome:
Installed: 3.4.3-1
Candidate: 3.4.3-1
Version table:
*** 3.4.3-1 0
500 http://
100 /var/lib/
3) What you expected to happen
a) Add an os.execute( ... ) statement to Awesome's rc.lua file
b) Restart Awesome
c) Command executes
4) What happened instead
If the $SHELL envvar is incorrect (for example, it is not the absolute path to the shell or the file it references does not exist), any os.execute() statements in the rc.lua file fail. This does not happen when running Lua interactively. For example, suppose the $SHELL is set to "zsh" rather than "/usr/bin/zsh". Any os.execute() statements in the rc.lua file produce and error similar to this:
(process:29762): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Failed to execute child process "zsh" (No such file or directory)
E: awesome: signal_fatal:260: dumping backtrace
awesome(
awesome() [0x40f6ac]
/lib/libpthread
/lib/libc.
/lib/libglib-
awesome(
awesome() [0x42729a]
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
/usr/lib/
awesome() [0x426320]
awesome(
awesome(main+0x897) [0x4105a7]
/lib/libc.
awesome() [0x40f439]
However, I can start Lua interactively and the os.execute() statements will succeed:
~> lua
Lua 5.0.3 Copyright (C) 1994-2006 Tecgraf, PUC-Rio
> os.execute("echo $SHELL")
zsh
If Lua is able to handle this case interactively, it should also be able to handle this case when running Awesome.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: awesome 3.4.3-1
Uname: Linux 2.6.34-
NonfreeKernelMo
Architecture: amd64
Date: Sun Aug 22 18:45:41 2010
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=zsh
SourcePackage: awesome