diff options
author | Roland McGrath <roland@gnu.org> | 1999-05-23 17:35:15 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1999-05-23 17:35:15 +0000 |
commit | 9ce357fb689307118db60112b155da179292ba9b (patch) | |
tree | 0583d1aaa9e83e425daf132afd7552f26dfc4a52 /proc | |
parent | ebe198c4b98931ea6ea12f6b2ab7466d2ede9eb9 (diff) |
1999-05-23 Roland McGrath <roland@baalperazim.frob.com>
* main.c (main): Set up console on stderr.
Diffstat (limited to 'proc')
-rw-r--r-- | proc/main.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/proc/main.c b/proc/main.c index 7f9157bd..fafbf713 100644 --- a/proc/main.c +++ b/proc/main.c @@ -117,6 +117,19 @@ main (int argc, char **argv, char **envp) mach_port_deallocate (mach_task_self (), pset); mach_port_deallocate (mach_task_self (), psetcntl); + { + /* Get our stderr set up to print on the console, in case we have + to panic or something. */ + mach_port_t cons; + error_t err; + err = device_open (master_device_port, D_READ|D_WRITE, "console", &cons); + assert_perror (err); + stdin = mach_open_devstream (cons, "r"); + stdout = stderr = mach_open_devstream (cons, "w"); + mach_port_deallocate (mach_task_self (), cons); + } + + /* wire_task_self (); */ while (1) |