realbasic-nug
[Top] [All Lists]

Re: shell inconsistency...

To: "REALbasic Network Users Group" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: shell inconsistency...
From: "Asher Dunn" <Asher_Dunn at sad17 dot k12 dot me dot us>
Date: Sun, 29 Feb 2004 18:47:52 -0500
References: <628DAC42-6AEB-11D8-B0AC-000A95688BEA at neuropop dot com>
"REALbasic Network Users Group" <realbasic-nug at lists dot realsoftware dot 
com>
writes:
>I have an app which needs to launch a background daemon.
>
>I was using
>
>dim f as folderitem
>
>f=getfolderitem("").child("mldk").child("mlnet")
>f.launch
>
>but this always launched the daemon as a root process, so it was 
>dumping all it's support files in the root directory rather than in 
>it's own
>
>Also, on Windows the launch always terminated before completion.

Try setting shell.timeOut = -1
>
>
>So then I tried
>dim f as folderitem
>f=getfolderitem("").child("mldk")
>
>path=replaceAll(f,":","/")

You mean path = replaceAll(f.absolutePath, ":", "/")?
You should't need this anyway. The path should be platform correct.
>
>mShell1.execute "sh"
>mShell1.write "cd " + path +chr(13)

If mldk is your program, this cd command will fail, because your trying to
cd _into_ a file.
>
>mShell1.write "./mlnet" + chr(13)

Also, try execute instead of write.
>
>
>This works fine on my laptop, but on 10.2.1 the daemon won't launch, 
>and of course on Windows it doesn't do squat... (even if I replaceAll 
>":" with "\")
>
>
>I'm still running RB 5.2.4
>
>is this a 10.2.1 problem, or a shell issue... and why won'd Windows do 
>the right thing?...


Asher


 - - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>