Decoded: false (coreutils)

[Back to Project Main Page]

Note: This page explores the design of command-line utilities. It is not a user guide.
[GNU Manual] [POSIX requirement] [Linux man] [FreeBSD man]

Logical flow of false command (coreutils)

Summary

false - Do nothing, unsuccessfully

[Source] [Code Walkthrough]

Lines of code: 3
Principal syscall: None
Support syscalls: None
Options: 2 (help and version)

Spirtually linked to the false utility from Version 7 UNIX (1979)
Added to Coreutils in July 2005 [Only version]
Number of revisions: 1

The purpose of false is to force a guaranteed evaluation of false in the shell (thus in shell scripts)

Helpers:
  • None
External non-standard helpers:
  • None

Setup

false (and true) macros EXIT_STATUS to the respective return value. Thus, false is the only possible exit to this utility

false only uses the default parsing options, which require no initialization

No additional variables are initialized in main()


Parsing

Verision and help are handled as with all utilities

Parsing cannot fail for false.


Execution

Execution returns EXIT_STATUS and cannot fail


[Back to Project Main Page]