From owner-freebsd-questions@FreeBSD.ORG Sat Mar 13 02:31:47 2004 Return-Path: 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 C907B16A4CE for ; Sat, 13 Mar 2004 02:31:47 -0800 (PST) Received: from smtp.netcabo.pt (smtp.netcabo.pt [212.113.174.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 482DE43D48 for ; Sat, 13 Mar 2004 02:31:47 -0800 (PST) (envelope-from hishadow@netcabo.pt) Received: from slug ([213.22.188.24]) by smtp.netcabo.pt with Microsoft SMTPSVC(5.0.2195.6713); Sat, 13 Mar 2004 10:31:37 +0000 From: "Joe Kraft" To: Date: Sat, 13 Mar 2004 10:31:37 -0000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-OriginalArrivalTime: 13 Mar 2004 10:31:37.0382 (UTC) FILETIME=[5D499460:01C408E6] Subject: KSambaPlugin question X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Mar 2004 10:31:47 -0000 I've been looking at the KSambaPlugin and am interested in it. I noticed  there used to be a port for this KControl plugin, but it appears to not  have been updated and was removed.  I figured it's as good of a place as  any to start digging into FreeBSD, but I've run into a problem with it.  I've made the changes to the port files and it configures and builds fine,  but it won't run.  I'm new with programming on FreeBSD, so forgive me if  this is an easy problem to solve...  I'm using KDE 3.2, Samba 3.0.1, FreeBSD 5.2, and ksambaplugin 0.5.      kde-3.2.0           The "meta-port" for KDE    kdebase-3.2.0_1     Basic applications for the KDE system    kdelibs-3.2.0       Base set of libraries needed by KDE programs    samba-3.0.1_2,1     A free SMB and CIFS client and server for UNIX    samba-libsmbclient-3.0.1 The shared lib from the samba packages  The compile is relatively clean, only a few messages about unused variables  and arguments and a couple about using some print headers which are  supposed to be for internal KDE use.  No errors though.  What is happening is that the plugin is freezing when it's called.  I've  tracked it down to the external process call (testParam.start), which never  returns.  Here's the relevant code parts:  --- start code ---    KProcess testParam;    testParam << "testparm";    testParam << "-V";    _parmOutput = QString("");    _sambaVersion = 2;    connect( &testParam, SIGNAL(receivedStdout(KProcess*,char*,int)),            this, SLOT(testParmStdOutReceived(KProcess*,char*,int)));  =>if (testParam.start(KProcess::Block,KProcess::Stdout)) {      if (_parmOutput.find("3") > -1)        _sambaVersion = 3;    }   --- end code ---  --- more code ---    void SambaFile::testParmStdOutReceived(KProcess *, char *buffer, int  buflen)    {      _parmOutput+=QString::fromLatin1(buffer,buflen);    }  --- end more code ---  I can run the 'testparm -V' from a shell to get the samba version, but the  response seems to get lost here.  Is there anything that should be  different in this snippet of code?  It appears the plugin has only been  tested in Linux; so, is there a common problem I'm running into here.   Pointers to any additional documentation I should read would be  appreciated.  Thanks,  Joe.