incubator-nuttx/libc/unistd/Kconfig

91 lines
3.3 KiB
Plaintext

#
# For a description of the syntax of this configuration file,
# see the file kconfig-language.txt in the NuttX tools repository.
#
menu "Program Execution Options"
config LIBC_EXECFUNCS
bool "Enable exec[l|v] / posix_spawn() Support"
default n
depends on !BINFMT_DISABLE
---help---
Enable support for the exec[l|v] family of functions that can be
used to start other programs, terminating the current program and
the posix_spawn() familty of functions that can be used start other
programs without terminating the current program. The typical
usage of the exec[l|v] functions is (1) first call vfork() to create
a new thread, then (2) call exec[l|v] to replace the new thread with
a program from the file system.
NOTE 1: This two step process start is completely unnecessary in
NuttX and is provided only for compatibily with Unix systems. These
functions are essentially just wrapper functions that (1) call the
non-standard binfmt function 'exec', and then (2) exit(0). Since
the new thread will be terminated by the exec[l|v] call, it really
served no purpose other than to suport Unix compatility.
The posix_spawn() functions do not have this inefficiency.
NOTE 2: Support for exec[l|v] and posix_spawn() is conditional
because they require additional support for symbol tables that
will not be available in the typical system.
if LIBC_EXECFUNCS
config EXECFUNCS_HAVE_SYMTAB
bool "Have symbol table"
default n if BUILD_KERNEL
default y if !BUILD_KERNEL
---help---
If you have a system symbol table, then you must select this
option in order to use it. Symbol tables are required in most
cases in order to like executable programs to the base code.
if EXECFUNCS_HAVE_SYMTAB
config EXECFUNCS_SYMTAB
string "Symbol table used by exec[l|v]"
default "g_symtab"
---help---
The exec[l|v] and posix_spawn() functions are wrapper functions that
call the non-standard binfmt function 'exec'). The binfmt
function 'exec' needs to have (1) a symbol table that provides the
list of symbols exported by the base code, and (2) the number of
symbols in that table. This selection provides the name of that
symbol table.
config EXECFUNCS_NSYMBOLS
int "Number of Symbols in the Table"
default 0
---help---
The exec[l|v] and posix_spawn() functions are wrapper functions that
call the non-standard binfmt function 'exec'). The binfmt
function 'exec' needs to have (1) a symbol table that provides the
list of symbols exported by the base code, and (2) the number of
symbols in that table. This selection provides the number of
symbols in the symbol table.
endif # EXECFUNCS_HAVE_SYMTAB
endif # LIBC_EXECFUNCS
config POSIX_SPAWN_PROXY_STACKSIZE
int "Spawn Stack Size"
default 1024
---help---
If posix_spawn[p]() and task_spawn() use I/O redirection options,
they will require an intermediary/proxy task to muck with the file
descriptors. This configuration item specifies the stack size
used for the proxy. Default: 1024 bytes.
config TASK_SPAWN_DEFAULT_STACKSIZE
int "Default task_spawn Stack Size"
default 2048
depends on !ARCH_ADDRENV
---help---
The actual size to use for the child task's stack can be set with
task_spawnattr_setstacksize(). This value specifies the default
stack size to use if task_spawnattr_setstacksize() is not used.
Default: 2048.
endmenu # Program Execution Options