From 027a73a903af306449710ce12bc09e0e3550c6c9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 4 Aug 2016 10:16:59 -0500 Subject: Make xopen() skip stdin/stdout/stderr, add xopen_stdio() if you want stdout, add xopenro() that takes one argument and understands "-" means stdin, and switch over lots of users. --- toys/pending/openvt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/pending/openvt.c') diff --git a/toys/pending/openvt.c b/toys/pending/openvt.c index 042b897c..29f8a174 100644 --- a/toys/pending/openvt.c +++ b/toys/pending/openvt.c @@ -100,7 +100,7 @@ void openvt_main(void) xioctl(fd, VT_GETSTATE, &vstate); close(0); //new vt becomes stdin - vt_fd = xopen(toybuf, O_RDWR); + vt_fd = xopen_stdio(toybuf, O_RDWR); if (toys.optflags & FLAG_s) { ioctl(vt_fd, VT_ACTIVATE, TT.vt_num); ioctl(vt_fd, VT_WAITACTIVE, TT.vt_num); -- cgit v1.2.3