posix_openpt man page on Minix

Man page or keyword search:  
man Server   6208 pages
apropos Keyword Search (all sections)
Output format
Minix logo
[printable version]

POSIX_OPENPT(3)		 BSD Library Functions Manual	       POSIX_OPENPT(3)

NAME
     posix_openpt — open a pseudo-terminal device

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <stdlib.h>
     #include <fcntl.h>

     int
     posix_openpt(int oflag);

DESCRIPTION
     The posix_openpt() function searches for an unused master pseudo-terminal
     device, opens it, and returns a file descriptor associated with the now
     used pseudo-terminal device.  The oflag argument has the same meaning as
     in the open(2) call.

RETURN VALUES
     If successful, posix_openpt() returns a non-negative integer, which cor‐
     responds to a file descriptor pointing to the master pseudo-terminal
     device.  Otherwise, a value of -1 is returned and errno is set to indi‐
     cate the error.

SEE ALSO
     ioctl(2), open(2), grantpt(3), ptsname(3), unlockpt(3)

RATIONALE
     The standards committee did not want to directly expose the cloning
     device, thus decided to wrap the functionality in this function.  The
     equivalent code would be:

	     int
	     posix_openpt(int oflag) {
		     return open("/dev/ptmx", oflag);
	     }

STANDARDS
     The posix_openpt() function conforms to IEEE Std 1003.1-2001 (“POSIX.1”).

BSD				 May 25, 2004				   BSD
[top]

List of man pages available for Minix

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net