diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-12-02 05:23:40 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-12-02 05:23:40 +0100 |
commit | c66e2cf34707f07278ef72d72484f0af26ac33e4 (patch) | |
tree | bd59859b749d4be0abe90cbfeaec392e2829510f /doc/info/exec-as.texinfo | |
parent | add man page (diff) | |
download | exec-as-c66e2cf34707f07278ef72d72484f0af26ac33e4.tar.gz exec-as-c66e2cf34707f07278ef72d72484f0af26ac33e4.tar.bz2 exec-as-c66e2cf34707f07278ef72d72484f0af26ac33e4.tar.xz |
add info manual
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'doc/info/exec-as.texinfo')
-rw-r--r-- | doc/info/exec-as.texinfo | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/doc/info/exec-as.texinfo b/doc/info/exec-as.texinfo new file mode 100644 index 0000000..e918650 --- /dev/null +++ b/doc/info/exec-as.texinfo @@ -0,0 +1,108 @@ +\input texinfo @c -*-texinfo-*- + +@c %**start of header +@setfilename exec-as.info +@settitle exec-as +@afourpaper +@documentencoding UTF-8 +@documentlanguage en +@finalout +@c %**end of header + + +@dircategory Miscellaneous +@direntry +* exec-as: (exec-as). exec with explicit argv[0] +@end direntry + + +@copying +Copyright @copyright{} 2015 Mattias Andrée + +@quotation +Permission is granted to copy, distribute and/or modify this document +under the terms of the GNU Free Documentation License, Version 1.3 or +any later version published by the Free Software Foundation; with no +Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +Texts. A copy of the license is included in the section entitled +``GNU Free Documentation License''. +@end quotation +@end copying + +@ifnottex +@node Top +@top exec-as -- exec with explicit argv[0] +@insertcopying +@end ifnottex + +@titlepage +@title exec-as +@subtitle exec with explicit @code{argv[0]} +@author by Mattias Andrée (maandree) + +@page +@vskip 0pt plus 1filll +@insertcopying +@page +@end titlepage + +@contents + + + +@menu +* Overview:: Brief overview of @command{exec-as}. +* Invoking:: Executing @command{exec-as}. +* GNU Free Documentation License:: Copying and sharing this manual. +@end menu + + + +@node Overview +@chapter Overview +@command{exec-as} shall spawn a program and +lets the user specify a value for @code{argv[0]} +explicitly. + +@command{exec-as} is intended as a shell +command. It makes no since to use it from most +programming languages. + +Since this is not a builtin function, it cannot +be used as @command{exec} without arguments to +set file descriptors. + +Because this is not a builtin function, running +@command{exec-as} would normally do an fork–exec +rather than just an exec. To just perform an +exec, you need to use @command{exec} too: +@code{exec exec-as} + + + +@node Invoking +@chapter Invoking + +At least two arguments are required. The first +argument is the file to run. This can either +be an absolute path, an explicitly relative path, +or a file in @env{$PATH}. The second argument +is the name of the process, @code{argv[0]}. +The following arguments are the rest in of the +values in @code{argv}, often called the +command line arguments. + +@command{'exec-as bash -bash'} will run the first +program in @env{$PATH} named @command{bash}, and +set @code{argv[0]} to @code{-bash} (making it a +login shell.) You can add addition argument as +needed. + + + +@node GNU Free Documentation License +@appendix GNU Free Documentation License +@include fdl.texinfo + +@bye + |