$ ); echo $? echoed 0,all other shells echo 2.
[unix-history] / usr / src / bin / sh / exec.h
CommitLineData
ec939471 1/*-
d1b73048
KB
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
ec939471
KB
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * %sccs.include.redist.c%
9 *
13b3e634 10 * @(#)exec.h 8.2 (Berkeley) %G%
ec939471
KB
11 */
12
13/* values of cmdtype */
14#define CMDUNKNOWN -1 /* no entry in table for command */
15#define CMDNORMAL 0 /* command is an executable program */
16#define CMDBUILTIN 1 /* command is a shell builtin */
17#define CMDFUNCTION 2 /* command is a shell function */
18
19
20struct cmdentry {
21 int cmdtype;
22 union param {
23 int index;
24 union node *func;
25 } u;
26};
27
28
29extern char *pathopt; /* set by padvance */
30
13b3e634
CZ
31void shellexec __P((char **, char **, char *, int));
32char *padvance __P((char **, char *));
33int hashcmd __P((int, char **));
34void find_command __P((char *, struct cmdentry *, int));
35int find_builtin __P((char *));
36void hashcd __P((void));
37void changepath __P((char *));
38void deletefuncs __P((void));
39void getcmdentry __P((char *, struct cmdentry *));
40void addcmdentry __P((char *, struct cmdentry *));
41void defun __P((char *, union node *));
42int unsetfunc __P((char *));