|
Message-ID: <20141102141912.GA3637@euler> Date: Sun, 2 Nov 2014 15:19:12 +0100 From: Felix Janda <felix.janda@...teo.de> To: musl@...ts.openwall.com Subject: Re: Add login_tty > > int login_tty(int fd) > > { > > int ret; > > setsid(); > > ret = ioctl(fd, TIOCSCTTY, (char *)0); > > dup2(fd, 0); > > dup2(fd, 1); > > dup2(fd, 2); > > if (fd>2) close(fd); > > return ret; > > } > > This behavior seems preferable in itself, but it's inconsistent with > what glibc and probably the BSDs do, so it's probably not a good idea. > glibc's behavior seems to match your previous version. This is leading > me to think maybe the code in forkpty should just stay separate. Do > you have other ideas? I've checked that Free- Net- and OpenBSD have the behavior of the previous version. Another approach would be to _exit in the child if login_tty fails. However the parent might interpret the exit code. Felix > Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.