From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31605 invoked by alias); 4 Nov 2004 08:39:31 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 31474 invoked from network); 4 Nov 2004 08:39:29 -0000 Received: from unknown (HELO redpinesignals.com) (203.196.161.92) by sourceware.org with SMTP; 4 Nov 2004 08:39:29 -0000 Received: from [192.168.1.11] ([192.168.1.11]) by redpinesignals.com (8.12.10+Sun/8.12.5) with ESMTP id iA491Fum011338; Thu, 4 Nov 2004 14:31:15 +0530 (IST) Message-ID: <4189ED20.2090102@redpinesignals.com> Date: Thu, 04 Nov 2004 08:39:00 -0000 From: Sriharsha Vedurmudi Organization: Redpine Signals Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 MIME-Version: 1.0 To: Lalit Seth , gcc-help@gcc.gnu.org Subject: Re: How o acheive this in C++ References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-11/txt/msg00016.txt.bz2 Absoultely, not the right list. Anyway try it using the tee command and capture the output into a file. Alternatively, you can write it as a script and run the system on the script. Harsha. Lalit Seth wrote: > > Thanks for Reply. > > What i wanted is to make call from C++. > like > retval = System("ps -ale"); > > But this prints the result on console. > > I wanted some how i can get that back in some variable/structure in C++. > >> From: Ramana Radhakrishnan >> To: Lalit Seth >> CC: gcc-help@gcc.gnu.org >> Subject: Re: How o acheive this in C++ >> Date: Thu, 04 Nov 2004 13:13:24 +0530 >> >> Hi, >> >> >> >> man proc >> man kill >> man raise >> man signal >> >> Also, not the right list to ask about Unix system programming. This is >> the place for more about using and building GCC . >> >> cheers >> Ramana >> > > _________________________________________________________________ > Mergers, takeovers, buyouts. Get all the latest biz bytes. > http://www.msn.co.in/business/ Tune in to MSN Business! >