Last change
on this file since 373 was 352, checked in by coas-nagasima, 6 years ago |
arm向けASP3版ECNLを追加
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
223 bytes
|
Line | |
---|
1 | #include <utmp.h>
|
---|
2 | #include <sys/ioctl.h>
|
---|
3 | #include <unistd.h>
|
---|
4 |
|
---|
5 | int login_tty(int fd)
|
---|
6 | {
|
---|
7 | setsid();
|
---|
8 | if (ioctl(fd, TIOCSCTTY, (char *)0)) return -1;
|
---|
9 | dup2(fd, 0);
|
---|
10 | dup2(fd, 1);
|
---|
11 | dup2(fd, 2);
|
---|
12 | if (fd>2) close(fd);
|
---|
13 | return 0;
|
---|
14 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.