From owner-freebsd-questions@FreeBSD.ORG Sun Nov 27 18:23:01 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1255016A41F for ; Sun, 27 Nov 2005 18:23:01 +0000 (GMT) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr1.xs4all.nl (smtp-vbr1.xs4all.nl [194.109.24.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id A2E3A43D8F for ; Sun, 27 Nov 2005 18:22:50 +0000 (GMT) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr1.xs4all.nl (8.13.3/8.13.3) with ESMTP id jARIMcZ5033067; Sun, 27 Nov 2005 19:22:38 +0100 (CET) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id 6EB52B84B; Sun, 27 Nov 2005 19:22:38 +0100 (CET) Date: Sun, 27 Nov 2005 19:22:38 +0100 From: Roland Smith To: Javier Matos Message-ID: <20051127182238.GA93184@slackbox.xs4all.nl> Mail-Followup-To: Javier Matos , freebsd-questions@freebsd.org References: <002901c5f37e$ad060950$0301a8c0@mindcrash> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="y0ulUmNC+osPPQO6" Content-Disposition: inline In-Reply-To: <002901c5f37e$ad060950$0301a8c0@mindcrash> User-Agent: Mutt/1.4.2.1i X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: are there some function in C to notify about the OS used? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2005 18:23:01 -0000 --y0ulUmNC+osPPQO6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 27, 2005 at 07:16:21PM +0100, Javier Matos wrote: > I was programming an application to work with system process that can > be found in /proc path and now I must to migrate my application to a > linux OS but the structure of status file is different. I made two > procedures to take information about status files, one for FreeBSD and > another for Linux... , now I need some function in C to notify about > the OS used to run the application to select between two > procedures... but I can?t find it, can anyone help me? FILE *f =3D popen("uname", "r"); Read the name from the pipe f, and then pclose(f); --=20 R.F.Smith (http://www.xs4all.nl/~rsmith/) Please send e-mail as plain text. public key: http://www.xs4all.nl/~rsmith/pubkey.txt --y0ulUmNC+osPPQO6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDifluEnfvsMMhpyURAj7gAKChI/7wPMkd8l7b1itB3soBaCCZsgCfSyQg yhBQxVevWFRoYCNoiwk+/10= =7xNp -----END PGP SIGNATURE----- --y0ulUmNC+osPPQO6--