From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42864 invoked by alias); 24 Aug 2019 11:01:27 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 42853 invoked by uid 89); 24 Aug 2019 11:01:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.2 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,GARBLED_BODY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 spammy=H*Ad:U*kawa X-HELO: mail-40130.protonmail.ch Received: from mail-40130.protonmail.ch (HELO mail-40130.protonmail.ch) (185.70.40.130) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 24 Aug 2019 11:01:24 +0000 Date: Sat, 24 Aug 2019 11:01:00 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=default; t=1566644481; bh=MwL/elkR9jY7bROarUU1sz10Y9VdOfPptj25MN24vTE=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=AWPCJtvdZNPNmzNKISyO3nbFa+L5WFYmbwc1uBdidMWnz5eAhTfjNuwbLa96Lo0Kl DAO+1BntegHcSIHPM+cPRCt8kUyMhXA6wcJ6YMQfxggif42XG9vUFSU7IqdRmn90Zf FOFYB/0EVPxy/MEdUpgxvkm2oBiJ36FoKzz5y4ns= To: Sudarshan S Chawathe From: spellcard199 Cc: "kawa@sourceware.org" Reply-To: spellcard199 Subject: Re: Example of run-process with redirection to pipe? Message-ID: In-Reply-To: <12176.1566582795@localhost> References: <12176.1566582795@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2019-q3/txt/msg00012.txt.bz2 Hello. I am also new to kawa, and I don't know why it behaves the way it do= es (seems a java permissions thing to me), but you can get the InputStream = using: (gnu.kawa.functions.RunProcess:getInputStreamFrom p) I found this using "grep -r Stream" inside the Kawa/kawa/lib directory in t= he kawa source code, which I found to be a great learning resource. =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me= ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 On Friday, August 23, 2019 7:53 PM, Sudarshan S Chawathe w= rote: > I am probably missing something obvious but I cannot seem to figure out > how to use run-process with output redirected to a pipe. > > Based on my reading of the manual, I have: > > (let ((p (run-process "echo Hello" > out-to: 'pipe))) > (p:getInputStream)) > > but it give an error (full trace below) that I can't quite interpret: > > java.lang.IllegalAccessException: Class gnu.expr.PrimProcedure can not > access a member of class java.lang.UNIXProcess with modifiers "public" > > I would be grateful if someone could point me to some code illustrating > the use of the pipe feature of run-process. > > Regards, > > -chaw > > Stack trace: > > w.scm:3:4: warning - no known slot 'getInputStream' in java.lang.Object > java.lang.IllegalAccessException: Class gnu.expr.PrimProcedure can not ac= cess a member of class java.lang.UNIXProcess with modifiers "public" > at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102) > at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObj= ect.java:296) > at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:2= 88) > at java.lang.reflect.Method.invoke(Method.java:491) > at gnu.expr.PrimProcedure.applyToConsumerX(PrimProcedure.java:310) > at gnu.expr.PrimProcedure.applyToConsumer(PrimProcedure.java:189) > at gnu.mapping.CallContext.runUntilDone(CallContext.java:586) > at gnu.mapping.CallContext.runUntilValue(CallContext.java:669) > at gnu.mapping.Procedure.applyN(Procedure.java:136) > at gnu.kawa.functions.NamedPart.applyN(NamedPart.java:90) > at gnu.mapping.ProcedureN.applyToObject(ProcedureN.java:45) > at gnu.mapping.Procedure.applyToConsumerDefault(Procedure.java:75) > at gnu.kawa.functions.ApplyToArgs.applyToConsumerA2A(ApplyToArgs.java:132) > at gnu.mapping.CallContext.runUntilDone(CallContext.java:586) > at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:343) > at gnu.expr.CompiledModule.evalModule(CompiledModule.java:42) > at gnu.expr.CompiledModule.evalModule(CompiledModule.java:60) > at kawa.Shell.runFile(Shell.java:571) > at kawa.Shell.runFileOrClass(Shell.java:474) > at kawa.repl.processArgs(repl.java:710) > at kawa.repl.main(repl.java:830)