diff --git a/usr.bin/launch/launch.1 b/usr.bin/launch/launch.1 new file mode 100644 index 0000000..37c7a84 --- /dev/null +++ b/usr.bin/launch/launch.1 @@ -0,0 +1,27 @@ +.TH LAUNCH 1 +.SH NAME +launch \- adds application to the GS/OS quit stack +.SH DESCRIPTION +.B launch +programs that are not fully compatible wth GNO, such as ProSEL 16 and ProDOS 8 applications. +.LP +Once it's added to the quit stack, you can execute the program by +.BR "exit" " if you ran gsh straight from initrc. If you are using init," +.RB "type " "init 5" ". " +You will probably want to make aliases for them in gshrc for convenience. +.SH SYNOPSIS +.BR launch " [-n] " +.LP +.BR filename " is the full path name of program -- no namespace." +.LP +.BR -n " do not add GNO to the quit stack; upon exiting the launched" +application, you will return to the application that launched GNO. +.SH EXAMPLES +alias pt 'launch /diskname/proterm/pt3.system;exit' +.br +alias pt 'launch /diskname/proterm/pt3.system;init 5' +.SH AUTHOR +.LP +.nf +Jawaid Bazyar (bazyar@cs.uiuc.edu) +.fi diff --git a/usr.man/man1/launch.1 b/usr.man/man1/launch.1 new file mode 100644 index 0000000..37c7a84 --- /dev/null +++ b/usr.man/man1/launch.1 @@ -0,0 +1,27 @@ +.TH LAUNCH 1 +.SH NAME +launch \- adds application to the GS/OS quit stack +.SH DESCRIPTION +.B launch +programs that are not fully compatible wth GNO, such as ProSEL 16 and ProDOS 8 applications. +.LP +Once it's added to the quit stack, you can execute the program by +.BR "exit" " if you ran gsh straight from initrc. If you are using init," +.RB "type " "init 5" ". " +You will probably want to make aliases for them in gshrc for convenience. +.SH SYNOPSIS +.BR launch " [-n] " +.LP +.BR filename " is the full path name of program -- no namespace." +.LP +.BR -n " do not add GNO to the quit stack; upon exiting the launched" +application, you will return to the application that launched GNO. +.SH EXAMPLES +alias pt 'launch /diskname/proterm/pt3.system;exit' +.br +alias pt 'launch /diskname/proterm/pt3.system;init 5' +.SH AUTHOR +.LP +.nf +Jawaid Bazyar (bazyar@cs.uiuc.edu) +.fi diff --git a/usr.man/man2/fork2.2 b/usr.man/man2/fork2.2 new file mode 100644 index 0000000..0abdc2a --- /dev/null +++ b/usr.man/man2/fork2.2 @@ -0,0 +1,71 @@ +.TH FORK2 2 +.SH NAME +fork2 \- start a new process from inside the current application +.SH SYNOPSIS +#include +.sp 1 +int +.BR fork2 +.RI " (void *" proc , +word +.IR stack , +word +.IR prio ", char *" procname , +word +.IR numargs ", ...);" +.SH DESCRIPTION +.B fork2 +is similar to +.BR fork (2), +except that it allows more parameters to be passed than just function +which the child process will execute. +.LP +.I proc +is the name of the function at which the child process will begin execution. +.I stack +is the number of bytes of stack to allocate to the proess. If +.I stack +is not a multiple of 256, then it +is rounded up to the next highest multiple of 256 bytes. +.I prio +is the priority to assign to the process. Priorities are not currently +implemented, and you should pass 0 for this argument. +.I procname +is a string you can have associated with the process when viewing +the process table (See +.BR ps (1)). +.I numargs +is the number of +.B words +of arguments which follow, not the +number of arguments. +Any arguments following +.I numargs +are passed as parameters to the child's procedure. +.SH EXAMPLE +.nf + +int main (int argc, char **argv) { + ... + + pid = fork2(proc1,1024,0,"sub-process",3,argc,argv); + ... + + return 0; +} + +void proc1(int argc, char *argv[]) +{ + ... +} + +.fi +.SH "RETURN VALUE" +.BR fork2 +returns to the parent the process ID of the new process on success. +On failure, -1 is returned and +.B errno +is set. +.SH HISTORY +.B fork2 +first appeared in XINU.