Path: news.cs.au.dk!Morten.Grouleff.Mjolner.Informatics From: Morten Grouleff Newsgroups: comp.lang.beta Subject: Re: problems with processes Date: 01 Mar 1999 12:59:16 +0100 Organization: Mjolner Informatics. Lines: 64 Message-ID: References: <36D844A5.CFAAFEF4@nef.wh.uni-dortmund.de> NNTP-Posting-Host: hugin.mjolner.dk Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: xinwen.cs.au.dk 920289556 16142 255.255.255.255 (1 Mar 1999 11:59:16 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 1 Mar 1999 11:59:16 GMT X-Newsreader: Gnus v5.5/Emacs 19.34 Xref: news.cs.au.dk comp.lang.beta:11849 Arne Hüggenberg writes: > Hello everyone, > i have a problem im hoping someone here can me help with > Using the PE for Linux im trying to do something like this: > lprtest.bet: > > ORIGIN '~beta/basiclib/current/systemenv'; > INCLUDE 'lpr'; > > -- program:descriptor -- > systemenv > (# > TextToPrint: ^TEXT; > do > &text[]->TextToPrint[]; > 'this is a test'->TextToPrint.putline; > 'wonder if this works'->TextToPrint.putline; > TextToPrint[]->&lpr_process; > #) > > > with lpr.bet being: > > ORIGIN '~beta/basiclib/current/systemenv'; > INCLUDE '~beta/process/current/processmanager'; > -- Systemlib: Attributes -- > lpr_process: Systemenv > (# > PrintMe: ^TEXT; > exec: > (# name: ^text; child: @process; > enter name[] > do > name[]->child.init; > printme[]->child.RedirectFromChannel; > child.start; > child.awaitStopped; > #); > > enter PrintMe[] > do 'starting lpr_process'->putline; > ('/usr/bin/lpr')->exec; > #); You can only have one SystemEnvironment in your entire program. Only the program:descriptor should be prefixed with systemEnv. lpr.bet should have ORIGIN in basicsystemenv or indirectly through ORIGIN in processmanager. Only the program:descriptor should have origin in systemenv. The channels you can redirect from include files and sockets, not texts. Using redirection is not portable to windows or macintosh. Place the text you want to print in a file, then execute lpr with that file as an argument instead. Regards, -- ** Morten Grouleff: ** ** Earthworm Jim PC: ** ** Mjølner Informatics: **