From owner-freebsd-questions Thu Dec 19 2:50:19 2002 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 3143537B401 for ; Thu, 19 Dec 2002 02:50:18 -0800 (PST) Received: from famine.e-raist.com (famine.e-raist.com [65.100.40.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D28843EC2 for ; Thu, 19 Dec 2002 02:50:17 -0800 (PST) (envelope-from aburke@nullplusone.com) Received: from thebe (AC949742.ipt.aol.com [172.148.151.66]) (authenticated bits=0) by famine.e-raist.com (8.12.2/8.12.2) with ESMTP id gBJAoEhE035614 for ; Thu, 19 Dec 2002 02:50:16 -0800 (PST) From: "Aaron Burke" To: Subject: Problems with a C application that changes users and run 'screen -x' Date: Thu, 19 Dec 2002 02:50:31 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hello list I have an application that simply logs in as another user and runs "screen -x". The problem I am having with the followin code is that the results of execution is a message from (I am guessing the shell) saying that I dont have access to the "/dev/ttyp?" where ? is the current virtual terminal that I am running on. Here is my application: #include int main(int argc, char* pszArgs[]) { int result; result= system("/usr/bin/su ppp -m --login -c " & "/usr/local/bin/screen -x"); return result; } And here is the output: bash-2.05$ ./a.out To see the output from when your computer started, run dmesg(8). If it has been replaced with other messages, look at /var/run/dmesg.boot. -- Francisco Reyes Cannot open your terminal '/dev/ttyp0' - please check. Thank you all for your time. Aaron Burke aburke@nullplusone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message