os.execute() commands in rc.lua fail if shell envvar is incorrect

Bug #622515 reported by Richard Griswold
6
This bug affects 1 person
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://us.archive.ubuntu.com/ubuntu/ lucid/universe Packages
        100 /var/lib/dpkg/status

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(backtrace_get+0x26) [0x43c6f6]
awesome() [0x40f6ac]
/lib/libpthread.so.0(+0xf8f0) [0x7f972f2eb8f0]
/lib/libc.so.6(cfree+0x1d) [0x7f972efd6dfd]
/lib/libglib-2.0.so.0(g_error_free+0x12) [0x7f973235d012]
awesome(spawn_system+0xba) [0x42811a]
awesome() [0x42729a]
/usr/lib/liblua5.1.so.0(+0xcbc1) [0x7f972f9c7bc1]
/usr/lib/liblua5.1.so.0(+0x17959) [0x7f972f9d2959]
/usr/lib/liblua5.1.so.0(+0xd08d) [0x7f972f9c808d]
/usr/lib/liblua5.1.so.0(+0xc737) [0x7f972f9c7737]
/usr/lib/liblua5.1.so.0(+0xc7b2) [0x7f972f9c77b2]
/usr/lib/liblua5.1.so.0(lua_pcall+0x51) [0x7f972f9c31a1]
awesome() [0x426320]
awesome(luaA_parserc+0x62) [0x4264b2]
awesome(main+0x897) [0x4105a7]
/lib/libc.so.6(__libc_start_main+0xfd) [0x7f972ef77c4d]
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-020634-generic x86_64
NonfreeKernelModules: vboxnetadp vboxnetflt vboxdrv
Architecture: amd64
Date: Sun Aug 22 18:45:41 2010
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=zsh
SourcePackage: awesome

Revision history for this message
Richard Griswold (richgriswold) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.