diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-10-17 11:15:14 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-10-17 11:15:14 +0000 |
commit | 6343d9e51dff0b86bd5b6d9f6aca2e155aba5549 (patch) | |
tree | 8a8b7b14c596713e28cb55c8562d42949ee5f3d9 /test/stdlib/ptytest.c | |
parent | db7c5027f4dfaa1cb83d25f7284d124bee4eb574 (diff) |
Add a test from Alex King <alex@morrison.king.net.nz> which
shows a failure in ptsname when ASSUME_DEVPTS=false
-Erik
Diffstat (limited to 'test/stdlib/ptytest.c')
-rw-r--r-- | test/stdlib/ptytest.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/stdlib/ptytest.c b/test/stdlib/ptytest.c new file mode 100644 index 000000000..e85072e76 --- /dev/null +++ b/test/stdlib/ptytest.c @@ -0,0 +1,19 @@ +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> + +int main() +{ + int fd; + char *cp; + + fd=open("/dev/ptmx",O_NOCTTY|O_RDWR); + cp=ptsname(fd); + if (cp==NULL) + return EXIT_FAILURE; + printf("ptsname %s\n",cp); + return EXIT_SUCCESS; +} + |