# Graceful Console Handling?

**URL:** <https://www.ruby-forum.com/t/graceful-console-handling/127703>\
**Category:** IronRuby\
**Created:** [January 31, 2008, 3:27pm UTC](https://www.ruby-forum.com/t/graceful-console-handling/127703 "2008-01-31T15:27:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [January 31, 2008, 3:27pm UTC](https://www.ruby-forum.com/t/graceful-console-handling/127703/1 "2008-01-31T15:27:44Z")

</div>

So I’ve created a project utilizing the DLR and IronRuby  
([http://www.codeplex.com/ironlogo](http://www.codeplex.com/ironlogo)) The Console classes seemed pretty  
tied to having an actual console open, and then there’s no real way to  
shut them down gracefully. Am I just missing something, somewhere?  
Seems like there should be a RubyCommandLine.Exit method or  
somesuch…

–  
Michael L.  
[Polymath Programmer]  
[http://michaeldotnet.blogspot.com](http://michaeldotnet.blogspot.com)

---

<div class="post-metadata">

**Author:** ![dreamwave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7feea3/32.png) [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Post date:** [January 31, 2008, 8:28pm UTC](https://www.ruby-forum.com/t/graceful-console-handling/127703/2 "2008-01-31T20:28:58Z")

</div>

I don’t know about the ironruby console features. But the dotnet console  
class only encapsulates a small part of the the surface area of the  
console related APIs. So to do more (like redirect a console  
programatically, or use a hidden console) you may need to do p/invoke to  
windows APIs

Having said that, the console subsystem of windows is very aged and a  
dog to work with.

Sincerely,  
Karl Prosser  
http:/www.powershell.com
