A community of Frontier
and Radio Users


Meridian News


Community List


Regex Project

Re: Radio Userland

Posted 
Last Modified 
In Response To 
 
2/5/2002; 11:10 AM by steve harley
2/5/2002; 11:10 AM by steve harley
Re: Radio Userland (#15645)
Reply To This Message [Edit]
<x-flowed>at 2002 02 05, 15:15 -0500, they whom i call Emmanuel. M. Decarie wrote:
>>Stupid question: can it run command-line with "&", as a background
>>process that doesn't quit when you log out?
>>If so, then it is Unix.
>
>The only solution that I saw was offered on the AppleScript Studio
>list in this thread:
>"[do shell script] forked daemons prevent command completion"
><http://lists.apple.com/archives/applescript-studio/2002/Jan/3.html>
>
>What one need to do is to "daemonize" a Perl script like in the
>example in perldoc perlipc and in the above thread.

there's also a purely command-line solution on that same
thread (last message) that confirmed my suspicion that the
output of the process is what blocks AppleScript (and Radio,
presumably -- i haven't tried it there). for example, you
can spawn a non-terminating process without blocking
AppleScript like this:

do shell script "sleep 30 >/dev/null 2>&1 &"
do shell script "ps axwwopid,ppid,command | grep sleep"

the second command shows sleep is still running and it
hasn't blocked. when i did it with sudo

do shell script "echo password | sudo -S sleep 600 >/dev/null 2>&1 &"

the sleep process now survived logout. however i doubt this
will work with Radio without some re-engineering.

--
steve harley steve@paper-ape.com

</x-flowed>

Enclosures


None.  

Replies







Re: Radio Userland
2/5/2002 by Henri Asseily
<x-flowed>Yes, it's all about output. If we can somehow manage to fool Frontier into outputting to /dev/null we're golden.