Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/f/forkpty.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/f/forkpty.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/f/forkpty.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/f/forkpty.html on line 8
Create a new process operating in a pseudo-tty
#include <unix.h>
pid_t forkpty( int *amaster,
char *name,
struct termios *termp,
struct winsize *winp );
- amaster
- A pointer to a location where forkpty() can store the
file descriptor of the master side of the pseudo-tty.
- name
- NULL, or a pointer to a buffer where forkpty()
can store the filename of the slave side of the pseudo-tty.
- termp
- NULL, or a pointer to a
termios
structure that describes the terminal's control attributes to apply to
the slave side of the pseudo-tty.
- winp
- A pointer to a winsize structure that defines the
window size to use for the slave side of the pseudo-tty.
libc
Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.
|
This function is in libc.a, but not in libc.so
(in order to save space). |
The forkpty() function combines
openpty(),
fork(),
and
login_tty()
to create a new process operating in a pseudo-tty.
This function fails if either openpty() or
fork() fails.
0 to the child process, the child's process ID to the parent, or -1
if an error occurred.
Unix
Safety: | |
Cancellation point |
Yes |
Interrupt handler |
No |
Signal handler |
Yes |
Thread |
Yes |
fork(),
login_tty(),
openpty(),
termios
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/lib_ref/f/forkpty.html on line 153
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/lib_ref/f/forkpty.html on line 153