From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 11887 invoked from network); 27 Oct 1998 20:18:49 -0000 Received: from mail.redhat.com (199.183.24.239) by mail2.redhat.com with SMTP; 27 Oct 1998 20:18:49 -0000 Received: from xcski.com (d185d1c51.rochester.rr.com [24.93.28.81]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id PAA20336 for ; Tue, 27 Oct 1998 15:08:05 -0500 Received: (from ptomblin@localhost) by xcski.com (8.8.7/8.8.7) id PAA23628; Tue, 27 Oct 1998 15:07:55 -0500 Message-ID: <19981027150754.A23008@xcski.com> Date: Tue, 27 Oct 1998 15:07:54 -0500 From: Paul Tomblin To: axp-list@redhat.com Subject: Re: Linux Programming... References: <199810271756.KAA13885@ellpspace.math.ualberta.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.91.1 In-Reply-To: ; from Keith Baker on Tue, Oct 27, 1998 at 02:37:50PM -0500 Quoting Keith Baker (toaster@cybercom.net): > without doing a loop to slow it down... Where is all of this wonderfull > info... I'd like to have a process which "wakes up" every 1/30 of a > second or so, does its task which is simple i/o and then goes back to > sleep. Oh yeah... one catch... The data to output needs to be shared > with another process. Is two seperate processes really the way to go? If > not, how do I create this non-linear time based jumping? 99.99% of this stuff is NOT linux specific. Get a copy of "Advanced Programming in the Unix Environment" by Stevens. This book (and his other books "Unix Network Programming" and "TCP/IP Illustrated") were my bibles when I was doing C and C++. Although you might want to start with something a little less heavy, like Marc Rochind's "Advanced Unix Programming". > linux... I know I could use a setuid root program and ioperm but I'd like > to be able to access my device from joe shmoe user... it is a simple box > which takes two different inputs... its a small DMX interface (A lighting The program is setuid root, which means that anybody who runs it is running it with all the permissions of root. Not a problem - you don't need a kernel patch for this. However, you need to be DAMN sure that there aren't any security holes in your program - no unbound reads into fixed buffers, no use of gets() or scanf, no stack smashing, etc. Also make sure the sysadmin on any system you install this in knows what you're doing - they get pretty nervous about setuid programs from unknown origins. -- Paul Tomblin, ptomblin@xcski.com. "The Windows NT workstations locked up every 2.58 minutes...The Linux workstations [which replaced them] haven't had a problem" - Randy Kessell, SBC Communications Inc.