diff options
| author | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-12 12:04:01 +0100 |
|---|---|---|
| committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-12 12:04:01 +0100 |
| commit | c5c1033c5c7deda8abe3448ec81bbb33c72219e0 (patch) | |
| tree | 6e5cef29b85161eea8a7488a029f5a32f982c6ab /lib/exec_shell.c | |
| parent | 462008f79be9e195670b202cb43827b8aeb1e60b (diff) | |
| parent | 2fb567c080e1762ec6a2147564f03068f55d4f14 (diff) | |
| download | util-linux-baserock/morph.tar.gz | |
Merge branch 'baserock/richardmaw/yakshave/util-linux-blkid' into baserock/morphbaserock/morph
Reviewed-by: Lars Wirzenius
Reviewed-by: Sam Thursfield
Diffstat (limited to 'lib/exec_shell.c')
| -rw-r--r-- | lib/exec_shell.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/exec_shell.c b/lib/exec_shell.c index 95620cd4d..2b263644d 100644 --- a/lib/exec_shell.c +++ b/lib/exec_shell.c @@ -1,3 +1,21 @@ +/* + * exec_shell() - launch a shell, else exit! + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -11,7 +29,8 @@ #define DEFAULT_SHELL "/bin/sh" -void __attribute__((__noreturn__)) exec_shell(void) { +void exec_shell(void) +{ const char *shell = getenv("SHELL"), *shell_basename; char *arg0; if (!shell) |
