]>
git.ipfire.org Git - ipfire-2.x.git/blob - src/misc-progs/iowrap.c
1 /* SmoothWall helper program - iowrap.
3 * This program is distributed under the terms of the GNU General Public
4 * Licence. See the file COPYING for details.
6 * (c) Lawrence Manning, 2001
7 * Installer helper for redirecting stdout/stderr to a file/terminal.
8 * init calls ash through this program to shove it on a tty.
10 * $Id: iowrap.c,v 1.2 2001/11/27 15:20:50 riddles Exp $
15 #include <sys/types.h>
20 int main(int argc
, char *argv
[])
22 /* Prog takes one argument. A device to run on (like a getty) */
27 if ((fd
= open(argv
[1], O_RDWR
)) == -1)
29 printf("Couldn't open device\n");
35 /* Now its sending/reading on that device. */
39 execvp(argv
[2], &argv
[2]);
41 printf("No command\n");