mailing list of musl libc
 help / color / mirror / code / Atom feed
f0be0a09a35533519dbdf4a65c76a895c3ce34e5 blob 223 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
 
#include <utmp.h>
#include <sys/ioctl.h>
#include <unistd.h>

int login_tty(int fd)
{
	setsid();
	if (ioctl(fd, TIOCSCTTY, (char *)0)) return -1;
	dup2(fd, 0);
	dup2(fd, 1);
	dup2(fd, 2);
	if (fd>2) close(fd);
	return 0;
}
debug log:

solving f0be0a0 ...
found f0be0a0 in https://git.vuxu.org/mirror/musl/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).