Bugzilla – Attachment 283 Details for
Bug 536
no access to tty on Linux 2.0 and 2.4+libc5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
cttytest.c: Test for broken Linux/glibc/openpty controlling terminal behaviour
cttytest.c (text/plain), 537 bytes, created by
Darren Tucker
on 2003-05-07 21:05:56 AEST
(
hide
)
Description:
cttytest.c: Test for broken Linux/glibc/openpty controlling terminal behaviour
Filename:
MIME Type:
Creator:
Darren Tucker
Created:
2003-05-07 21:05:56 AEST
Size:
537 bytes
patch
obsolete
>#include <stdio.h> >#include <sys/fcntl.h> >#include <pty.h> > >int >main() >{ > int fd, ptyfd, ttyfd, status; > > if (fork()!=0) { /* parent */ > wait(&status); > if (status == 0) > puts("Test failed: reacquired controlling tty"); > else > puts("Test passed."); > } else { /* child */ > close(0); close(1); close(2); > setsid(); > openpty(&ptyfd, &ttyfd, NULL, NULL, NULL); > fd = open("/dev/tty", O_RDWR | O_NOCTTY); > if (fd >= 0) > exit(0); /* Acquired ctty: broken */ > else > exit(1); /* Did not acquire ctty: OK */ > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 536
:
282
| 283 |
284
|
285
|
286