--Boundary-02CqU/H4PX9lMq25
Content-Type: text/plain;
  charsetso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Description: signed data
Content-Disposition: inline

On Sunday 31 August 2003 6:26 pm, Mark J. Reed wrote:
> On Sun, Aug 31, 2003 at 06:00:34PM -0500, Shashank Date wrote:
> > I am not sure that I understand what you mean by "bypassing the
> > shell",

> The only solution of which I'm aware is to use popen/exec:
>
> 	if fd = IO.popen('-') then
> 	    psOutput = fd.readlines.join("\n")
> 	else
> 	    exec 'ps', "-fp#{$$}"
> 	end

I believe open3 will do what you want as well:

require 'open3'
Open3.popen3("cmd","args","go","here","etc") { |in,out,err|
  out.readlines.join("\n")
}

-- 
Wesley J. Landaker - wjl / icecavern.net
OpenPGP FP: 4135 2A3B 4726 ACC5 9094  0097 F0A9 8A4C 4CD6 E3D2


--Boundary-02CqU/H4PX9lMq25
Content-Type: application/pgp-signature
Content-Description: signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQA/UqCo8KmKTEzW49IRArT9AJ9ijPduKwjvWj7B3pwNuG8b8lAHugCffltB
webs/gvmVHfnRvnvE2mszCAnb
-----END PGP SIGNATURE-----

--Boundary-02CqU/H4PX9lMq25--