[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
builtin "exec -l" does not function as published
From: |
eric__lee |
Subject: |
builtin "exec -l" does not function as published |
Date: |
Tue, 15 Apr 2003 22:33:25 +0100 |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -I. -I. -I./include -I./lib -I/usr/include -O2
-march=i386 -mcpu=i686
uname output: Linux t-heads 2.4.18 #29 Thu Oct 10 22:39:59 BST 2002 i686 unknown
Machine Type: i386-redhat-linux-gnu
Bash Version: 2.05
Patch Level: 8
Release Status: release
Description:
The man page suggests that the "-l" option causes "exec" to behave
like the "login" command and create a "-" (dash) prefix to argument
zero. When creating arg[0], login strips dirname and prefixes the
simple filename with a dash. Bash does not strip dirname, but simply
prefixes the whole pathname with a dash.
Repeat-By:
execute:
bash -c 'exec -l /bin/ps -f $$'
produces:
UID PID PPID C STIME TTY STAT TIME CMD
eric 24473 24406 0 22:24 pts/6 R 0:00 -/bin/ps -f 24473
Rather than expected:
UID PID PPID C STIME TTY STAT TIME CMD
eric 24473 24406 0 22:24 pts/6 R 0:00 -ps -f 24473
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- builtin "exec -l" does not function as published,
eric__lee <=