]> git.ipfire.org Git - thirdparty/bash.git/blame - builtins/colon.def
Bash-5.2 patch 17: fix for optimizing forks when using the . builtin in a subshell
[thirdparty/bash.git] / builtins / colon.def
CommitLineData
726f6388
JA
1This file is colon.def, from which is created colon.c.
2It implements the builtin ":" in Bash.
3
8868edaf 4Copyright (C) 1987-2019 Free Software Foundation, Inc.
726f6388
JA
5
6This file is part of GNU Bash, the Bourne Again SHell.
7
3185942a
JA
8Bash is free software: you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation, either version 3 of the License, or
11(at your option) any later version.
726f6388 12
3185942a
JA
13Bash is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
726f6388 17
3185942a
JA
18You should have received a copy of the GNU General Public License
19along with Bash. If not, see <http://www.gnu.org/licenses/>.
726f6388
JA
20
21$PRODUCES colon.c
22
23$BUILTIN :
7117c2d2 24$DOCNAME colon
726f6388
JA
25$FUNCTION colon_builtin
26$SHORT_DOC :
3185942a
JA
27Null command.
28
29No effect; the command does nothing.
30
31Exit Status:
32Always succeeds.
726f6388
JA
33$END
34
ccc6cda3 35$BUILTIN true
ccc6cda3
JA
36$FUNCTION colon_builtin
37$SHORT_DOC true
38Return a successful result.
3185942a
JA
39
40Exit Status:
41Always succeeds.
ccc6cda3
JA
42$END
43
44$BUILTIN false
ccc6cda3
JA
45$FUNCTION false_builtin
46$SHORT_DOC false
47Return an unsuccessful result.
3185942a
JA
48
49Exit Status:
50Always fails.
ccc6cda3
JA
51$END
52
8868edaf
CR
53#include <config.h>
54
55#if defined (HAVE_UNISTD_H)
56# include <unistd.h>
57#endif
58
59#include "../bashansi.h"
60#include "../shell.h"
61
ccc6cda3 62/* Return a successful result. */
726f6388
JA
63int
64colon_builtin (ignore)
8868edaf 65 WORD_LIST *ignore;
726f6388
JA
66{
67 return (0);
68}
ccc6cda3
JA
69
70/* Return an unsuccessful result. */
71int
72false_builtin (ignore)
8868edaf 73 WORD_LIST *ignore;
ccc6cda3
JA
74{
75 return (1);
76}