简体   繁体   中英

Process without writing output to console

I have a PHP script , it executes my program, and my program starts another process. But problem is, the PHP stock in executing for every writing to console output... I tested screen with -A -m -d parameters, but it didnot turn on process(program running ok, but process not started). Can I not write output to console with C#? Or how to ignore the PHP and continue with scripts?

Better thanx

You can use System.IO.Stream.Null to do that:

using System;
using System.IO;

Console.SetOut(new StreamWriter(Stream.Null));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM