From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3799 invoked by alias); 4 Aug 2003 13:05:47 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3777 invoked from network); 4 Aug 2003 13:05:44 -0000 Received: from unknown (HELO ngate.noida.hcltech.com) (202.54.110.230) by sources.redhat.com with SMTP; 4 Aug 2003 13:05:44 -0000 Received: from exch-01.noida.hcltech.com (exch-01 [204.160.254.29]) by ngate.noida.hcltech.com (8.12.8/8.12.8) with ESMTP id h74DBFeD009217 for ; Mon, 4 Aug 2003 18:41:15 +0530 Received: by exch-01.noida.hcltech.com with Internet Mail Service (5.5.2656.59) id ; Mon, 4 Aug 2003 18:35:18 +0530 Message-ID: From: "Vijay Saha, Noida" To: gdb@sources.redhat.com Subject: gdbserver tcsetpgrp() ?? Date: Mon, 04 Aug 2003 13:05:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-SW-Source: 2003-08/txt/msg00037.txt.bz2 Hi I have ported the gdbserver 5.3 on arm-linux target. But as soon as debugging finishes, the target system gets logged out. Then I had found that the "tcsetpgrp" in server.c:start_inferior() of gdbserver was the culprit. After commenting the line "tcsetpgrp (fileno (stderr), signal_pid);" , the logout problem got solved !!! I have also found that gdb-5.2 was not using this system call !! What does this tcsetpgrp actually doing ..?? (It has something to do with foreground processing of terminal ..means..??) How much is this necessary for remote debugging...?? **************************** clip of server.c*************************************** start_inferior (char *argv[], char *statusptr) { signal (SIGTTOU, SIG_DFL); signal (SIGTTIN, SIG_DFL); signal_pid = create_inferior (argv[0], argv); fprintf (stderr, "Process %s created; pid = %d\n", argv[0], signal_pid); signal (SIGTTOU, SIG_IGN); signal (SIGTTIN, SIG_IGN); /* chagall temp fix */ /* when we use this function chagall gets logged out */ //tcsetpgrp (fileno (stderr), signal_pid); /* Wait till we are at 1st instruction in program, return signal number. */ return mywait (statusptr, 0); } **************************************end clip ***************************************** Thanks and regards Vijay